Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
upgraded some stuff
  • Loading branch information
debanjanbasu committed Oct 29, 2017
commit 66311c8add1dc6e98604ce22351b747d93ae916d
26 changes: 13 additions & 13 deletions lib/packExternalModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,19 +292,19 @@ module.exports = {
this.serverless.utils.writeFileSync(modulePackageJson, JSON.stringify(modulePackage, null, 2));

// Copy modules
const startCopy = _.now();
return BbPromise.fromCallback(callback => fse.copy(path.join(compositeModulePath, 'node_modules'), path.join(modulePath, 'node_modules'), callback))
.tap(() => this.options.verbose && this.serverless.cli.log(`Copy modules: ${modulePath} [${_.now() - startCopy} ms]`))
.then(() => {
// Prune extraneous packages - removes not needed ones
const startPrune = _.now();
return BbPromise.fromCallback(callback => {
childProcess.exec('npm prune', {
cwd: modulePath
}, callback);
})
.tap(() => this.options.verbose && this.serverless.cli.log(`Prune: ${modulePath} [${_.now() - startPrune} ms]`));
});
// const startCopy = _.now();
// return BbPromise.fromCallback(callback => fse.copy(path.join(compositeModulePath, 'node_modules'), path.join(modulePath, 'node_modules'), callback))
// .tap(() => this.options.verbose && this.serverless.cli.log(`Copy modules: ${modulePath} [${_.now() - startCopy} ms]`))
// .then(() => {
// // Prune extraneous packages - removes not needed ones
// const startPrune = _.now();
// return BbPromise.fromCallback(callback => {
// childProcess.exec('npm prune', {
// cwd: modulePath
// }, callback);
// })
// .tap(() => this.options.verbose && this.serverless.cli.log(`Prune: ${modulePath} [${_.now() - startPrune} ms]`));
// });
})
.return();
});
Expand Down