forked from mirrors/easyappointments
Implemented the gulp doc task.
This commit is contained in:
parent
e02dec5460
commit
e2109b6ceb
3 changed files with 24 additions and 21 deletions
20
code-doc.sh
20
code-doc.sh
|
@ -1,20 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
#
|
|
||||||
# Bash script for the code documentation generation.
|
|
||||||
#
|
|
||||||
|
|
||||||
rm -rf doc
|
|
||||||
|
|
||||||
mkdir doc
|
|
||||||
mkdir doc/apigen
|
|
||||||
mkdir doc/jsdoc
|
|
||||||
mkdir doc/plato
|
|
||||||
|
|
||||||
php src/application/third_party/bin/apigen generate \
|
|
||||||
-s "src/application/controllers,src/application/models,src/application/libraries" \
|
|
||||||
-d "doc/apigen" --exclude "*external*" --tree --todo --template-theme "bootstrap"
|
|
||||||
|
|
||||||
node node_modules/.bin/jsdoc "src/assets/js" -d "doc/jsdoc"
|
|
||||||
|
|
||||||
node node_modules/.bin/plato -r -d "doc/plato" "src/assets/js"
|
|
25
gulpfile.js
25
gulpfile.js
|
@ -59,6 +59,29 @@ gulp.task('build', function(done) {
|
||||||
/**
|
/**
|
||||||
* Generate code documentation.
|
* Generate code documentation.
|
||||||
*/
|
*/
|
||||||
gulp.task('doc', function() {
|
gulp.task('doc', function(done) {
|
||||||
|
fs.removeSync('doc');
|
||||||
|
fs.mkdirSync('doc');
|
||||||
|
fs.mkdirSync('doc/apigen');
|
||||||
|
fs.mkdirSync('doc/jsdoc');
|
||||||
|
fs.mkdirSync('doc/plato');
|
||||||
|
|
||||||
|
var commands = [
|
||||||
|
'php rsc/apigen.phar generate ' +
|
||||||
|
'-s "src/application/controllers,src/application/models,src/application/libraries" ' +
|
||||||
|
'-d "doc/apigen" --exclude "*external*" --tree --todo --template-theme "bootstrap"',
|
||||||
|
|
||||||
|
'node node_modules/.bin/jsdoc "src/assets/js" -d "doc/jsdoc"',
|
||||||
|
|
||||||
|
'node node_modules/.bin/plato -r -d "doc/plato" "src/assets/js"'
|
||||||
|
];
|
||||||
|
|
||||||
|
commands.forEach(function(command) {
|
||||||
|
exec(command, function (err, stdout, stderr) {
|
||||||
|
console.log(stdout);
|
||||||
|
console.log(stderr);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
done();
|
||||||
});
|
});
|
||||||
|
|
BIN
rsc/apigen.phar
Normal file
BIN
rsc/apigen.phar
Normal file
Binary file not shown.
Loading…
Reference in a new issue