chore(public api): run build.sh before generating the api doc (#9889)
This commit is contained in:
parent
b7e69bc1a1
commit
c7fc51a185
24
gulpfile.js
24
gulpfile.js
|
@ -59,10 +59,17 @@ const publicApiArgs = [
|
|||
'--onStabilityMissing', 'error'
|
||||
].concat(entrypoints);
|
||||
|
||||
gulp.task('build.sh', (done) => {
|
||||
const childProcess = require('child_process');
|
||||
|
||||
childProcess.exec(path.join(__dirname, 'build.sh'), error => done(error));
|
||||
});
|
||||
|
||||
// Note that these two commands work on built d.ts files instead of the source
|
||||
gulp.task('public-api:enforce', (done) => {
|
||||
const child_process = require('child_process');
|
||||
child_process
|
||||
const childProcess = require('child_process');
|
||||
|
||||
childProcess
|
||||
.spawn(
|
||||
path.join(__dirname, `/node_modules/.bin/ts-api-guardian${/^win/.test(os.platform()) ? '.cmd' : ''}`),
|
||||
['--verifyDir', publicApiDir].concat(publicApiArgs), {stdio: 'inherit'})
|
||||
|
@ -76,9 +83,10 @@ gulp.task('public-api:enforce', (done) => {
|
|||
});
|
||||
});
|
||||
|
||||
gulp.task('public-api:update', (done) => {
|
||||
const child_process = require('child_process');
|
||||
child_process
|
||||
gulp.task('public-api:update', ['build.sh'], (done) => {
|
||||
const childProcess = require('child_process');
|
||||
|
||||
childProcess
|
||||
.spawn(
|
||||
path.join(__dirname, `/node_modules/.bin/ts-api-guardian${/^win/.test(os.platform()) ? '.cmd' : ''}`),
|
||||
['--outDir', publicApiDir].concat(publicApiArgs), {stdio: 'inherit'})
|
||||
|
@ -102,7 +110,7 @@ gulp.task('lint', ['format:enforce', 'tools:build'], () => {
|
|||
gulp.task('tools:build', (done) => { tsc('tools/', done); });
|
||||
|
||||
gulp.task('check-cycle', (done) => {
|
||||
var madge = require('madge');
|
||||
const madge = require('madge');
|
||||
|
||||
var dependencyObject = madge(['dist/all/'], {
|
||||
format: 'cjs',
|
||||
|
@ -149,9 +157,9 @@ gulp.task('changelog', () => {
|
|||
});
|
||||
|
||||
function tsc(projectPath, done) {
|
||||
let child_process = require('child_process');
|
||||
const childProcess = require('child_process');
|
||||
|
||||
child_process
|
||||
childProcess
|
||||
.spawn(
|
||||
path.normalize(`${__dirname}/node_modules/.bin/tsc`) + (/^win/.test(os.platform()) ? '.cmd' : ''),
|
||||
['-p', path.join(__dirname, projectPath)],
|
||||
|
|
Loading…
Reference in New Issue