Fix strapi-generate-admin

This commit is contained in:
Pierre Burgy 2017-09-08 17:14:11 +02:00
parent cb9730283a
commit 34561edd93
13 changed files with 32 additions and 15302 deletions

File diff suppressed because it is too large Load Diff

View File

@ -46,7 +46,7 @@
"plop": "^1.8.1",
"prettier": "^1.6.1",
"rimraf": "^2.6.1",
"strapi-helper-plugin": "file:../strapi-helper-plugin",
"strapi-helper-plugin": "3.0.0-alpha.5.5",
"webpack": "^3.5.6"
},
"author": {
@ -66,4 +66,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -15,9 +15,10 @@ const path = require('path');
*/
module.exports = (scope, cb) => {
exec('npm install', {
// Install back-end admin `node_modules`.
exec('npm install --production --ignore-scripts', {
cwd: path.resolve(scope.rootPath, 'admin')
}, (err, stdout) => {
}, (err) => {
if (err) {
return cb(err);
}

View File

@ -22,7 +22,10 @@ const fs = require('fs-extra');
module.exports = function (scope, cb) {
// Copy the admin files.
fs.copySync(path.resolve(__dirname, '..', '..', 'strapi-admin', 'files'), path.resolve(scope.rootPath, 'admin'));
fs.copySync(path.resolve(__dirname, '..', '..', 'strapi-admin'), path.resolve(scope.rootPath, 'admin'), {
// Skip `node_modules` folder.
filter: (file) => (!_.includes(file, 'node_modules') && !_.includes(file, 'package-lock.json'))
});
// Take another pass to take advantage of the defaults absorbed in previous passes.
_.defaults(scope, {

View File

@ -13,9 +13,9 @@
"lib": "./lib"
},
"dependencies": {
"fs-extra": "^0.30.0",
"fs-extra": "^4.0.1",
"lodash": "^4.17.4",
"strapi-admin": "file:../strapi-admin"
"strapi-admin": "3.0.0-alpha.5.5"
},
"author": {
"email": "hi@strapi.io",
@ -41,4 +41,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -17,7 +17,7 @@
"fs-extra": "^4.0.0",
"get-installed-path": "^3.0.1",
"lodash": "^4.17.4",
"strapi-utils": "file:../strapi-utils"
"strapi-utils": "3.0.0-alpha.5.5"
},
"scripts": {
"prepublish": "npm prune"
@ -46,4 +46,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -17,7 +17,7 @@
"fs-extra": "^4.0.0",
"lodash": "^4.17.4",
"reportback": "^2.0.1",
"strapi-utils": "file:../strapi-utils"
"strapi-utils": "3.0.0-alpha.5.5"
},
"author": {
"name": "Strapi team",
@ -43,4 +43,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -110,4 +110,4 @@
"whatwg-fetch": "^2.0.3"
},
"devDependencies": {}
}
}

View File

@ -20,7 +20,7 @@
"mongoose-double": "0.0.1",
"mongoose-float": "^1.0.2",
"pluralize": "^6.0.0",
"strapi-utils": "file:../strapi-utils"
"strapi-utils": "3.0.0-alpha.5.5"
},
"strapi": {
"isHook": true
@ -49,4 +49,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -61,7 +61,7 @@
"plop": "^1.8.1",
"prettier": "^1.6.1",
"rimraf": "^2.6.1",
"strapi-helper-plugin": "file:../strapi-helper-plugin",
"strapi-helper-plugin": "3.0.0-alpha.5.5",
"webpack": "^3.5.6"
}
}
}

View File

@ -48,7 +48,7 @@
"plop": "^1.8.1",
"prettier": "^1.6.1",
"rimraf": "^2.6.1",
"strapi-helper-plugin": "file:../strapi-helper-plugin",
"strapi-helper-plugin": "3.0.0-alpha.5.5",
"webpack": "^3.5.6"
},
"author": {
@ -68,4 +68,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}

View File

@ -45,4 +45,4 @@
"npm": ">= 5.3.0"
},
"license": "MIT"
}
}

View File

@ -51,13 +51,13 @@
"lodash": "^4.16.5",
"node-schedule": "^1.2.0",
"semver": "^5.4.1",
"strapi-generate": "file:../strapi-generate",
"strapi-generate-admin": "file:../strapi-generate-admin",
"strapi-generate-api": "file:../strapi-generate-api",
"strapi-generate-new": "file:../strapi-generate-new",
"strapi-generate-policy": "file:../strapi-generate-policy",
"strapi-generate-service": "file:../strapi-generate-service",
"strapi-utils": "file:../strapi-utils"
"strapi-generate": "3.0.0-alpha.5.5",
"strapi-generate-admin": "3.0.0-alpha.5.5",
"strapi-generate-api": "3.0.0-alpha.5.5",
"strapi-generate-new": "3.0.0-alpha.5.5",
"strapi-generate-policy": "3.0.0-alpha.5.5",
"strapi-generate-service": "3.0.0-alpha.5.5",
"strapi-utils": "3.0.0-alpha.5.5"
},
"author": {
"email": "hi@strapi.io",
@ -84,4 +84,4 @@
},
"preferGlobal": true,
"license": "MIT"
}
}