pre publish script to fix the needs of removing packcage

This commit is contained in:
Eugenio Romano
2019-03-04 15:10:23 +00:00
parent d6f856f1c5
commit b5631b9a7f
2 changed files with 16 additions and 0 deletions

14
scripts/pre-publish.js Normal file
View File

@@ -0,0 +1,14 @@
var fs = require('fs');
var file = require('../package.json');
Object.keys(file.dependencies).forEach((currentDep)=>{
if(currentDep.indexOf("@alfresco/adf-")>=0) {
delete file.dependencies[currentDep];
}
});
fs.writeFileSync('package.json', JSON.stringify(file), function (err) {
if (err) return console.log(err);
});