Faster npm install
gitea/salix/master This commit looks good
Details
gitea/salix/master This commit looks good
Details
This commit is contained in:
parent
98cf5a4a18
commit
435127b74a
|
@ -48,8 +48,8 @@ pipeline {
|
|||
}
|
||||
steps {
|
||||
nodejs('node-lts') {
|
||||
sh 'npm install --no-audit'
|
||||
sh 'gulp install'
|
||||
sh 'npm install --no-audit --prefer-offline'
|
||||
sh 'gulp install --ci'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,14 +240,15 @@ function install() {
|
|||
const install = require('gulp-install');
|
||||
const print = require('gulp-print');
|
||||
|
||||
let npmArgs = [];
|
||||
if (argv.ci) npmArgs = ['--no-audit', '--prefer-offline'];
|
||||
|
||||
let packageFiles = ['front/package.json', 'print/package.json'];
|
||||
return gulp.src(packageFiles)
|
||||
.pipe(print(filepath => {
|
||||
return `Installing packages in ${filepath}`;
|
||||
}))
|
||||
.pipe(install({
|
||||
npm: ['--no-package-lock']
|
||||
}));
|
||||
.pipe(install({npm: npmArgs}));
|
||||
}
|
||||
install.description = `Installs node dependencies in all directories`;
|
||||
|
||||
|
|
Loading…
Reference in New Issue