UNPKG

compound-ex4

Version:

Compound-ex4 - MVC framework for NodeJS (ExpressJs 4 version), fork compoundjs(https://github.com/1602/compound)

22 lines (15 loc) 514 B
#!/usr/bin/env node require('../global'); echo('Appending docs to README.md'); cd(__dirname + '/..'); // Extract docs from shell.js var docs = grep('//@', 'shell.js'); docs = docs.replace(/\/\/\@include (.+)/g, function(match, path) { var file = path.match('.js$') ? path : path+'.js'; return grep('//@', file); }); // Remove '//@' docs = docs.replace(/\/\/\@ ?/g, ''); // Append docs to README sed('-i', /## Command reference(.|\n)*/, '## Command reference\n\n' + docs, 'README.md'); echo('All done.');