Pete Bacon Darwin 0ba5bebf61 build: modularize the gulp file to be easier to maintain (#14259)
This is a precursor to bringing in some of the gulp tasks from angular.io,
which could lead to the gulpfile becoming unwieldy.
2017-02-03 00:10:41 -08:00

18 lines
538 B
JavaScript

module.exports = {
generate: (gulp) => () => {
const path = require('path');
const Dgeni = require('dgeni');
const angularDocsPackage = require(path.resolve(__dirname, '../docs/angular.io-package'));
const dgeni = new Dgeni([angularDocsPackage]);
return dgeni.generate();
},
test: (gulp) => () => {
const execSync = require('child_process').execSync;
execSync(
'node dist/tools/cjs-jasmine/index-tools ../../tools/docs/**/*.spec.js',
{stdio: ['inherit', 'inherit', 'inherit']});
}
};