jacobrask / styledocco

Automatically generate a style guide from your stylesheets.
http://jacobrask.github.com/styledocco/
MIT License
1.06k stars 119 forks source link

Add JS to Preview Iframes #99

Open am80l opened 11 years ago

am80l commented 11 years ago

Would be a nice feature to be able to include js in the iframe includes, for components that require js to be fully functional in the preview iframes.

Could be the same way styledocco includes css: ex: styledocco --include bootstrap.js

marrs commented 11 years ago

Thanks for the suggestion and sorry for not getting back to you sooner.

I think there is definitely merit in this as I certainly write CSS classes that are intended purely as states to be manipulated by JS.

I like the idea of attributing selectors in the comments (e.g. @requires path/to/other/stylesheet.css was discussed for dependencies). We could have a @requiresjs attribute or something similar.

If you have ideas for this that you'd like to pursue yourself, please be aware that the code is currently undergoing a rewrite and that you should develop against the dev0.7 branch.