mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-24 23:52:22 +03:00
Corrected automatic documentation generation.
This commit is contained in:
parent
1b65423349
commit
6c85c1088b
2 changed files with 11 additions and 6 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -12,3 +12,6 @@ src/storage/logs/*
|
|||
src/storage/uploads/*
|
||||
!src/storage/uploads/index.html
|
||||
src/config.php
|
||||
doc/apigen
|
||||
doc/jsdoc
|
||||
doc/plato
|
||||
|
|
14
gulpfile.js
14
gulpfile.js
|
@ -2,6 +2,7 @@ var gulp = require('gulp'),
|
|||
exec = require('child_process').execSync,
|
||||
del = require('del'),
|
||||
fs = require('fs-extra'),
|
||||
path = require('path'),
|
||||
zip = require('zip-dir');
|
||||
|
||||
/**
|
||||
|
@ -14,7 +15,7 @@ gulp.task('composer', function() {
|
|||
del.sync([
|
||||
'./composer',
|
||||
'./src/vendor/**/*',
|
||||
'!./src/vendor/index.html',
|
||||
'!./src/vendor/index.html'
|
||||
]);
|
||||
|
||||
exec('composer update && composer install --prefer-dist', function (err, stdout, stderr) {
|
||||
|
@ -52,7 +53,7 @@ gulp.task('build', function(done) {
|
|||
del.sync([
|
||||
'.tmp-package/application/logs/*',
|
||||
'!.tmp-package/application/logs/index.html'
|
||||
])
|
||||
]);
|
||||
|
||||
zip('.tmp-package', { saveTo: 'easyappointments.zip' }, function (err, buffer) {
|
||||
if (err)
|
||||
|
@ -66,10 +67,11 @@ gulp.task('build', function(done) {
|
|||
* Generate code documentation.
|
||||
*/
|
||||
gulp.task('doc', function(done) {
|
||||
fs.removeSync('doc');
|
||||
fs.mkdirSync('doc');
|
||||
fs.removeSync('doc/apigen');
|
||||
fs.mkdirSync('doc/apigen');
|
||||
fs.removeSync('doc/jsdoc');
|
||||
fs.mkdirSync('doc/jsdoc');
|
||||
fs.removeSync('doc/plato');
|
||||
fs.mkdirSync('doc/plato');
|
||||
|
||||
var commands = [
|
||||
|
@ -77,9 +79,9 @@ gulp.task('doc', function(done) {
|
|||
'-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"',
|
||||
path.join('.', 'node_modules', '.bin', 'jsdoc') + ' "src/assets/js" -d "doc/jsdoc"',
|
||||
|
||||
'node node_modules/.bin/plato -r -d "doc/plato" "src/assets/js"'
|
||||
path.join('.', 'node_modules', '.bin', 'plato') + ' -r -d "doc/plato" "src/assets/js"'
|
||||
];
|
||||
|
||||
commands.forEach(function(command) {
|
||||
|
|
Loading…
Reference in a new issue