-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated to KSS-Node 2.0 functionality #21
Open
kedruff
wants to merge
8
commits into
PhilJ:master
Choose a base branch
from
kedruff:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
39faae3
This should be a good commit
kdruff-c1 398b816
updating handleBars helpers
kdruff-c1 9787dfa
bad package number for KSS in package.json ... updated to ~2.0.2
kdruff-c1 275009b
had an error in which options were passed to kss.parse
kdruff-c1 ac61ea8
Update index.js
kedruff 38881c4
Update index.js
kedruff e19800c
Remove unused dependencie
Andersos f2b5ead
Merge pull request #1 from Andersos/patch-1
kedruff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,53 @@ | ||
# gulp-kss | ||
|
||
Gulp plugin for KSS ([Knyle Stype Sheets](http://warpspire.com/kss/)) documentation generation. | ||
Gulp plugin for KSS ([Knyle Style Sheets](http://warpspire.com/kss/)) documentation generation. | ||
|
||
This plugin is based on [kss-node](https://github.com/hughsk/kss-node) and generates a styleguide based on code documentation. The plugin is mainly a fork of `kss-nodes`'s bin script, not how a beautiful gulp plugin should look like, but it works. | ||
|
||
This plugin currently lacks tests. | ||
This plugin is based on [kss-node](https://github.com/hughsk/kss-node) and generates a styleguide based on code documentation. It builds upon the original [gulp-kss](https://github.com/philj/gulp-kss) by PhilJ but integrates newer node-kss features including custom properties, handlebars helpers, and more. | ||
|
||
## Install | ||
|
||
``` | ||
npm install gulp-kss | ||
git clone https://github.com/kedruff/gulp-kss.git | ||
npm install | ||
``` | ||
|
||
## Usage | ||
|
||
Pipe all source files you want to document through `gulp-kss`, also the ones which are usually imported. | ||
|
||
In addition to that you need to create a concated and compiled version of your styles at `public/style.css`. | ||
|
||
```javascript | ||
var gulp = require('gulp'); | ||
var gulpless = require('gulp-less'); | ||
var gulpkss = require('gulp-kss'); | ||
var gulpconcat = require('gulp-concat'); | ||
|
||
gulp.src(['styles/**/*.less']) | ||
.pipe(gulpkss({ | ||
overview: __dirname + '/styles/styleguide.md' | ||
})) | ||
gulp.src( ['array/*.scss', 'ofSource/*.scss', 'sass/files/*.scss'] ) | ||
.pipe( gulpkss({ | ||
template: './node_modules/kss/lib/template', | ||
multiline: true, | ||
typos: false | ||
custom: [], | ||
helpers: '', | ||
css: [], | ||
js: [] | ||
}) ) | ||
.pipe(gulp.dest('styleguide/')); | ||
|
||
// Concat and compile all your styles for correct rendering of the styleguide. | ||
gulp.src('styles/main.less') | ||
.pipe(gulpless()) | ||
.pipe(gulpconcat('public/style.css')) | ||
.pipe(gulp.dest('styleguide/')); | ||
``` | ||
|
||
## Options | ||
|
||
* `overview`: Absolute path to markdown file which is used for styleguide home page | ||
* `templateDirectory`: Absolute path to template directory, by default `kss-node` default template is used. | ||
* `kss`: Options supported by [`kss-node`](https://github.com/hughsk/kss-node/wiki/Module-API#wiki-options) | ||
* **template**: A path relative to your `gulpfile.js` containing a custom template (Default: `./node_modules/kss/lib/template/`) | ||
* **destination**: A path relative to your `gulpfile.js` where you would your compiled guide to live (Default: `./docs/styleguide/`) | ||
* **multiline** : As far as the parser is concerned, all but the last two paragraphs (separated by two line breaks) in a block are considered to be part of the description. In the case you don't have any modifiers but a large description it'll try to pick up this scenario. This setting's enabled by default, but you can disable it by adding multiline: false to your options. | ||
* **typos**: Thanks to [natural](https://github.com/NaturalNode/natural), `kss-node` can parse keywords phonetically rather then by their string value. In short: make a typo and the library will do its best to read it anyway. Enable this by setting typos to true in the options object. | ||
* **custom**: A custom property name when parsing KSS comments | ||
* **helpers**: Specify the location of custom [handlebars helpers](http://bit.ly/kss-helpers) (Default: `./lib/template/helpers`) | ||
* **css**: Specify the URL of a CSS file to include in the style guide | ||
* **js**: Specify the URL of a JavaScript file to include in the style guide | ||
|
||
## LICENSE | ||
|
||
(MIT License) | ||
|
||
Copyright (c) 2014 DigitalWerft [email protected] | ||
Copyright (c) 2015 Capital One Financial (Kevin Druff) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be changed if it's merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. My readme.md is a little bit of an awkward amalgamation of my public github version and the one that resides on the enterprise Github repo that we have internally at my employer.