33 lines
536 B
JavaScript
Raw Normal View History

2016-12-01 16:44:03 +01:00
'use strict';
/**
* Module dependencies
*/
const { exec } = require('child_process');
const path = require('path');
2016-12-01 16:44:03 +01:00
/**
* Runs after this generator has finished
*
* @param {Object} scope
* @param {Function} cb
*/
module.exports = (scope, cb) => {
if (scope.developerMode) {
return cb();
}
2017-09-08 17:14:11 +02:00
// Install back-end admin `node_modules`.
exec('npm install --production --ignore-scripts', {
cwd: path.resolve(scope.rootPath, 'admin')
2017-09-08 17:14:11 +02:00
}, (err) => {
if (err) {
return cb(err);
}
2016-12-01 16:44:03 +01:00
cb();
});
2016-12-01 16:44:03 +01:00
};