mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Remove package.json dependencies during build
The kibana app itself requires that package.json exist, so removing it entirely from distributions is a no go. Instead, we remove only the dependencies themselves from the package.json so people do not try to reinstall dependencies on an official distribution.
This commit is contained in:
parent
bd8ce389b9
commit
e2dd40e965
2 changed files with 13 additions and 0 deletions
|
@ -13,6 +13,7 @@ module.exports = function (grunt) {
|
|||
'_build:packageJson',
|
||||
'_build:readme',
|
||||
'_build:installNpmDeps',
|
||||
'_build:removePkgJsonDeps',
|
||||
'clean:testsFromModules',
|
||||
'clean:deepModuleBins',
|
||||
'clean:deepModules',
|
||||
|
|
12
tasks/build/removePkgJsonDeps.js
Normal file
12
tasks/build/removePkgJsonDeps.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
module.exports = function (grunt) {
|
||||
grunt.registerTask('_build:removePkgJsonDeps', function () {
|
||||
const pkg = grunt.file.readJSON('build/kibana/package.json');
|
||||
|
||||
delete pkg.dependencies;
|
||||
|
||||
grunt.file.write(
|
||||
'build/kibana/package.json',
|
||||
JSON.stringify(pkg, null, ' ')
|
||||
);
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue