kibana/tasks/build/removePkgJsonDeps.js
Court Ewing e2dd40e965 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.
2015-09-18 14:23:24 -04:00

12 lines
307 B
JavaScript

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, ' ')
);
});
};