2016-01-23 12:26:56 -05:00
|
|
|
/*
|
|
|
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
|
|
|
* http://paperjs.org/
|
|
|
|
*
|
|
|
|
* Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
|
|
|
* http://scratchdisk.com/ & http://jonathanpuckey.com/
|
|
|
|
*
|
|
|
|
* Distributed under the MIT license. See LICENSE file for details.
|
|
|
|
*
|
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
var gulp = require('gulp'),
|
|
|
|
del = require('del'),
|
2016-01-23 13:48:41 -05:00
|
|
|
shell = require('gulp-shell'),
|
|
|
|
options = require('../utils/options.js');
|
2016-01-23 12:26:56 -05:00
|
|
|
|
|
|
|
var docOptions = {
|
|
|
|
local: 'docs', // Generates the offline docs
|
|
|
|
server: 'serverdocs' // Generates the website templates for the online docs
|
|
|
|
};
|
|
|
|
|
|
|
|
Object.keys(docOptions).forEach(function(name) {
|
|
|
|
gulp.task('docs:' + name, ['clean:docs'], shell.task([
|
|
|
|
'java -cp jsrun.jar:lib/* JsRun app/run.js -c=conf/' + name + '.conf ' +
|
2016-01-23 13:48:41 -05:00
|
|
|
'-D="renderMode:' + docOptions[name] + '" ' +
|
|
|
|
'-D="version:' + options.version + '"'
|
2016-01-23 12:26:56 -05:00
|
|
|
], {
|
2016-01-23 13:23:43 -05:00
|
|
|
cwd: 'gulp/jsdoc'
|
2016-01-23 12:26:56 -05:00
|
|
|
}));
|
|
|
|
});
|
|
|
|
|
|
|
|
gulp.task('docs', ['docs:local']);
|