mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
Merge pull request #4819 from spalger/build/quieter
[build] prevent massive warnings in build
This commit is contained in:
commit
042b0e65fc
1 changed files with 4 additions and 4 deletions
|
@ -2,7 +2,7 @@ module.exports = function (grunt) {
|
||||||
let { config } = grunt;
|
let { config } = grunt;
|
||||||
let { statSync } = require('fs');
|
let { statSync } = require('fs');
|
||||||
let { join } = require('path');
|
let { join } = require('path');
|
||||||
let exec = (...args) => require('../utils/exec').silent(...args, { cwd: config.get('root') });
|
let exec = (...args) => require('../utils/exec')(...args, { cwd: config.get('root') });
|
||||||
let newFiles = [];
|
let newFiles = [];
|
||||||
let shrinkwrapFile = join(config.get('root'), 'npm-shrinkwrap.json');
|
let shrinkwrapFile = join(config.get('root'), 'npm-shrinkwrap.json');
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ module.exports = function (grunt) {
|
||||||
if (e.code !== 'ENOENT') throw e;
|
if (e.code !== 'ENOENT') throw e;
|
||||||
|
|
||||||
if (createIfMissing) {
|
if (createIfMissing) {
|
||||||
exec('npm', ['shrinkwrap', '--dev']);
|
exec('npm', ['shrinkwrap', '--dev', '--logLevel', 'error']);
|
||||||
newFiles.push(shrinkwrapFile);
|
newFiles.push(shrinkwrapFile);
|
||||||
}
|
}
|
||||||
else grunt.fail.warn('Releases require an npm-shrinkwrap.json file to exist');
|
else grunt.fail.warn('Releases require an npm-shrinkwrap.json file to exist');
|
||||||
|
@ -28,7 +28,7 @@ module.exports = function (grunt) {
|
||||||
exec('cp', ['npm-shrinkwrap.json', join(config.get('root'), 'build', 'kibana', 'npm-shrinkwrap.build.json')]);
|
exec('cp', ['npm-shrinkwrap.json', join(config.get('root'), 'build', 'kibana', 'npm-shrinkwrap.build.json')]);
|
||||||
|
|
||||||
// create shrinkwrap without dev dependencies and copy to build
|
// create shrinkwrap without dev dependencies and copy to build
|
||||||
exec('npm', ['shrinkwrap']);
|
exec('npm', ['shrinkwrap', '--logLevel', 'error']);
|
||||||
exec('cp', ['npm-shrinkwrap.json', join(config.get('root'), 'build', 'kibana', 'npm-shrinkwrap.json')]);
|
exec('cp', ['npm-shrinkwrap.json', join(config.get('root'), 'build', 'kibana', 'npm-shrinkwrap.json')]);
|
||||||
|
|
||||||
// restore the dev shrinkwrap
|
// restore the dev shrinkwrap
|
||||||
|
@ -38,4 +38,4 @@ module.exports = function (grunt) {
|
||||||
grunt.registerTask('_build:shrinkwrap:cleanup', function () {
|
grunt.registerTask('_build:shrinkwrap:cleanup', function () {
|
||||||
if (newFiles.length) exec('rm', newFiles.splice(0));
|
if (newFiles.length) exec('rm', newFiles.splice(0));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue