mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 13:47:33 +01:00
* move emails images to website/static/emails and remove old files * remove old client tests * remove more files * add sprites back * cleanup gulp * cleanup gulp * remove old files * more fixes * pin bootstrap-vue * disable old test * remove old tasks * fix apidoc
27 lines
639 B
JavaScript
27 lines
639 B
JavaScript
import gulp from 'gulp';
|
|
import clean from 'rimraf';
|
|
import apidoc from 'apidoc';
|
|
|
|
const APIDOC_DEST_PATH = './apidoc_build';
|
|
const APIDOC_SRC_PATH = './website/server';
|
|
gulp.task('apidoc:clean', (done) => {
|
|
clean(APIDOC_DEST_PATH, done);
|
|
});
|
|
|
|
gulp.task('apidoc', ['apidoc:clean'], (done) => {
|
|
let result = apidoc.createDoc({
|
|
src: APIDOC_SRC_PATH,
|
|
dest: APIDOC_DEST_PATH,
|
|
});
|
|
|
|
if (result === false) {
|
|
done(new Error('There was a problem generating apiDoc documentation.'));
|
|
} else {
|
|
done();
|
|
}
|
|
});
|
|
|
|
gulp.task('apidoc:watch', ['apidoc'], () => {
|
|
return gulp.watch(APIDOC_SRC_PATH + '/**/*.js', ['apidoc']);
|
|
});
|