-
Notifications
You must be signed in to change notification settings - Fork 329
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
Add doc generator #283
Add doc generator #283
Conversation
…d-doc-generator
…d-doc-generator
@@ -0,0 +1,9 @@ | |||
YUI.add("yuidoc-meta", function(Y) { |
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.
'YUI' is not defined.
} | ||
}, focusManager, '_focusPrevious', focusManager); | ||
|
||
Y.before(function (e, activeDescendant) { |
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.
'activeDescendant' is defined but never used.
gulp.watch('css/*.scss', ['sass']); | ||
}); | ||
|
||
gulp.task("docs-rename", function() { |
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.
Mixed double and single quotes.
change: noop, | ||
|
||
// Called every time the DK element is opened | ||
/** | ||
* Called whenever the Dropkick select is opened. The value of `this` is the Dropkick object itself. |
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.
Line is too long.
WHAT IS THIS!?
This adds doc generation from
dropkick.js
. Right from the source. This makes reading the source easier and maintaining the docs so much easier. I went with YUIDoc to generate the docs since that's the generator that allows theming. I needed to shape and mold the theme to what I needed since DropKick is pretty small.There are some fairly complex (read: probably bad) gulp tasks that take care of this for us.
First the yuidoc command is run via NPM. I use a gulp package that can run npm scripts and use that to build the docs, then copy the classes file, rename to index, and then put it in the root of the docs folder. Why? Because with yuidoc you can put the classes content into the index file due to the way the data flows. So we have this (hacky) way of getting what we want. Does it work? For sure! Is it pretty? Hell no!
What's after this?
More doc theme improvements, improving the actual docs wording, and finishing the release process (#270).