Enhance build command and fix generated service for Bookshelf

This commit is contained in:
Aurelsicoko 2017-10-10 19:34:15 +02:00
parent 2a5278b461
commit 59391c7a00
2 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@
"analyze:clean": "rimraf stats.json",
"preanalyze": "npm run analyze:clean",
"analyze": "node node_modules/strapi-helper-plugin/lib/internals/scripts/analyze.js",
"build": "cross-env NODE_ENV=production IS_ADMIN=true webpack --config node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress",
"build": "npm run build:dll && cross-env NODE_ENV=production IS_ADMIN=true webpack --config node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress",
"build:dll": "cross-env NODE_ENV=production webpack --config node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.dll.babel.js --color -p --progress",
"build:clean": "rimraf admin/build",
"start": "cross-env NODE_ENV=development PORT=4000 IS_ADMIN=true node node_modules/strapi-helper-plugin/lib/server",
@ -66,4 +66,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -110,7 +110,7 @@ module.exports = {
* @return {Object}
*/
editRelation: (params, values) => {
editRelation: async (params, values) => {
const relation = _.find(strapi.models.<%= id %>.associations, {alias: params.relation});
if (!_.isEmpty(relation) && _.isArray(values)) {