Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //install kss and fs-extra: npm install kss fs-extra
- var kss = require('kss'),
- options = {
- markdown: false
- };
- var fs = require('fs-extra');
- var file = './docs/kss.json';
- kss.traverse('.', options, function (err, styleguide) {
- if (err) throw err;
- var mySections = styleguide.section();
- var myJsonSections = []
- for (var i = 0, tot = mySections.length; i < tot; i++) {
- myJsonSections.push(mySections[i].JSON());
- }
- fs.outputJson(file, myJsonSections, function (err) {
- console.log(err) // => null
- })
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement