0.1.2 • Published 11 years ago
grunt-spiritual-dox v0.1.2
grunt-spiritual-dox
Grunt task to build quick-and-dirty documentation for JavaScript projects. You can install it like this:
npm install wunderbyte/grunt-spiritual-doxThis Gruntfile will produce documentation for the src folder and launch it on localhost using grunt-devserver:
module.exports = function(grunt) {
[
'grunt-spiritual-dox',
'grunt-devserver'
].forEach(grunt.loadNpmTasks);
grunt.initConfig({
spiritualdox : {
myproject : {
files : {
'index.html' : [ 'src/**/*.js' ]
}
}
},
devserver: {
server: {},
options: {
port: 8023
}
}
});
grunt.registerTask('default', ['spiritualdox','devserver']);
};The resulting document index.html will load sources via XMLHttpRequest, so make sure that the server has access to the src folder. We're using Prism.js for syntax highlighting and Showdown.js for Markdown parsing.