Add devDependencies in npm run clean command

This commit is contained in:
Pierre Burgy 2017-08-23 15:54:56 +02:00
parent e8ded208e6
commit 8e2aaccf09
3 changed files with 10 additions and 2 deletions

View File

@ -61,7 +61,7 @@
"plop": "^1.5.0",
"prettier": "^1.5.3",
"rimraf": "^2.5.4",
"strapi-helper-plugin": "file:../strapi-helper-plugin",
"strapi-helper-plugin": "^3.0.0-alpha.4.8",
"webpack": "^2.1.0-beta.25"
}
}

View File

@ -48,7 +48,7 @@
"plop": "^1.5.0",
"prettier": "^1.5.3",
"rimraf": "^2.5.4",
"strapi-helper-plugin": "file:../strapi-helper-plugin",
"strapi-helper-plugin": "^3.0.0-alpha.4.8",
"webpack": "^2.1.0-beta.25"
},
"author": {

View File

@ -16,6 +16,14 @@ try {
}
});
if (packageJSON.devDependencies) {
Object.keys(packageJSON.devDependencies).filter(devDependency => devDependency.indexOf('strapi-') !== -1).forEach(devDependency => {
if (packageJSON.devDependencies[devDependency].indexOf('file:') !== -1) {
packageJSON.devDependencies[devDependency] = '^' + pkgJSON.version;
}
});
}
fs.writeFileSync(path.resolve(process.cwd(), 'packages', pkg, 'package.json'), JSON.stringify(packageJSON, null, 2), 'utf8');
});
} catch (error) {