Avoid to rebuild admin during installation and remove useless dependencies

This commit is contained in:
Aurelsicoko 2017-11-13 19:24:29 +01:00
parent 0eab3d1219
commit f80b54f1e0
10 changed files with 60 additions and 148 deletions

View File

@ -7,48 +7,28 @@
"url": "git://github.com/strapi/strapi-admin.git"
},
"scripts": {
"analyze:clean": "rimraf stats.json",
"analyze:clean": "node ../strapi-helper-plugin/node_modules/.bin/rimraf stats.json",
"preanalyze": "npm run analyze:clean",
"analyze": "node ../strapi-helper-plugin/lib/internals/scripts/analyze.js",
"build": "npm run build:dll && cross-env NODE_ENV=production IS_ADMIN=true webpack --config ../strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress",
"build:dll": "cross-env NODE_ENV=production webpack --config ../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 ../strapi-helper-plugin/lib/server",
"generate": "plop --plopfile ../strapi-helper-plugin/lib/internals/generators/index.js",
"lint": "eslint --ignore-path .gitignore --config ../strapi-helper-plugin/lib/internals/eslint/.eslintrc.json admin",
"build": "npm run build:dll && node ../strapi-helper-plugin/node_modules/.bin/cross-env NODE_ENV=production IS_ADMIN=true node ../strapi-helper-plugin/node_modules/.bin/webpack --config ../strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress",
"build:dll": "node ../strapi-helper-plugin/node_modules/.bin/cross-env NODE_ENV=production node ../strapi-helper-plugin/node_modules/.bin/webpack --config ../strapi-helper-plugin/lib/internals/webpack/webpack.dll.babel.js --color -p --progress",
"build:clean": "node ../strapi-helper-plugin/node_modules/.bin/rimraf admin/build",
"start": "node ../strapi-helper-plugin/node_modules/.bin/cross-env NODE_ENV=development PORT=4000 IS_ADMIN=true node ../strapi-helper-plugin/lib/server",
"generate": "node ../strapi-helper-plugin/node_modules/.bin/plop --plopfile ../strapi-helper-plugin/lib/internals/generators/index.js",
"lint": "node ../strapi-helper-plugin/node_modules/.bin/eslint --ignore-path .gitignore --config ../strapi-helper-plugin/lib/internals/eslint/.eslintrc.json admin",
"pretest": "npm run lint",
"prettier": "prettier --single-quote --trailing-comma es5 --write \"{admin,__{tests,mocks}__}/**/*.js\"",
"prettier": "node ../strapi-helper-plugin/node_modules/.bin/prettier --single-quote --trailing-comma es5 --write \"{admin,__{tests,mocks}__}/**/*.js\"",
"test": "echo Tests are not implemented.",
"prepublish": "npm run build",
"postinstall": "node ../strapi-helper-plugin/lib/internals/scripts/postinstall.js"
"prepublishOnly": "npm run build"
},
"dependencies": {
"cheerio": "^1.0.0-rc.2",
"fs-extra": "^0.30.0",
"cheerio": "^1.0.0-rc.2"
},
"devDependencies": {
"sanitize.css": "^4.1.0",
"strapi-helper-plugin": "3.0.0-alpha.6.4",
"strapi-utils": "3.0.0-alpha.6.4"
},
"devDependencies": {
"cross-env": "^5.1.1",
"eslint": "^4.11.0",
"eslint-config-airbnb": "^15.1.0",
"eslint-config-airbnb-base": "^11.3.2",
"eslint-config-prettier": "^2.7.0",
"eslint-import-resolver-webpack": "^0.8.3",
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0",
"eslint-plugin-redux-saga": "^0.4.0",
"extract-text-webpack-plugin": "^1.0.1",
"html-loader": "^0.4.3",
"html-webpack-plugin": "^2.22.0",
"plop": "^1.9.0",
"prettier": "^1.8.2",
"rimraf": "^2.6.2",
"webpack": "^3.8.1"
},
"author": {
"name": "Strapi",
"email": "",
@ -62,7 +42,7 @@
}
],
"engines": {
"node": ">= 7.0.0",
"node": ">= 8.0.0",
"npm": ">= 3.0.0"
},
"license": "MIT"

View File

@ -17,7 +17,6 @@
"main": "./lib",
"dependencies": {
"bookshelf": "^0.10.3",
"knex": "^0.13.0",
"lodash": "^4.17.4",
"pluralize": "^6.0.0",
"strapi-knex": "3.0.0-alpha.6.4",

File diff suppressed because one or more lines are too long

View File

@ -34,23 +34,17 @@
"babel-core": "^6.26.0",
"babel-eslint": "^7.2.3",
"babel-loader": "^7.1.1",
"babel-plugin-istanbul": "^4.1.4",
"babel-plugin-react-intl": "^2.3.1",
"babel-plugin-react-transform": "^2.0.2",
"babel-plugin-transform-async-to-generator": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-react-constant-elements": "^6.23.0",
"babel-plugin-transform-react-inline-elements": "^6.22.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.8",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.26.0",
"babel-preset-es2017": "^6.24.1",
"babel-preset-latest": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-react-hmre": "^1.1.1",
"babel-preset-stage-0": "^6.24.1",
"bootstrap": "^4.0.0-alpha.6",
"chalk": "^2.1.0",
"cheerio": "^1.0.0-rc.2",
"classnames": "^2.2.5",
"cross-env": "^5.0.5",
"css-loader": "^0.28.5",
"eslint": "^4.4.1",
@ -58,8 +52,7 @@
"eslint-config-airbnb-base": "^11.3.1",
"eslint-config-prettier": "^2.3.0",
"eslint-import-resolver-webpack": "^0.8.3",
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.2.1",
"eslint-plugin-redux-saga": "^0.4.0",
@ -90,6 +83,7 @@
"postcss-smart-import": "^0.7.5",
"precss": "^2.0.0",
"prettier": "^1.5.3",
"prop-types": "^15.5.10",
"react": "^16.0.0",
"react-datetime": "^2.8.6",
"react-dom": "^16.0.0",

View File

@ -29,41 +29,22 @@
"description": "content-manager.plugin.description"
},
"scripts": {
"analyze:clean": "rimraf stats.json",
"analyze:clean": "node node_modules/strapi-helper-plugin/node_modules/.bin/rimraf stats.json",
"preanalyze": "npm run analyze:clean",
"analyze": "node node_modules/strapi-helper-plugin/lib/internals/scripts/analyze.js",
"prebuild": "npm run build:clean && npm run test",
"build": "cross-env NODE_ENV=production webpack --config node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress",
"build:clean": "rimraf admin/build",
"start": "cross-env NODE_ENV=development PLUGIN=true node node_modules/strapi-helper-plugin/lib/server",
"generate": "node_modules/plop/plop.js --plopfile node_modules/strapi-helper-plugin/lib/internals/generators/index.js",
"lint": "eslint --ignore-path .gitignore --config node_modules/strapi-helper-plugin/lib/internals/eslint/.eslintrc.json admin",
"build": "node node_modules/strapi-helper-plugin/node_modules/.bin/cross-env NODE_ENV=production node node_modules/strapi-helper-plugin/node_modules/.bin/webpack --config node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress",
"build:clean": "node node_modules/strapi-helper-plugin/node_modules/.bin/rimraf admin/build",
"start": "node node_modules/strapi-helper-plugin/node_modules/.bin/cross-env NODE_ENV=development PLUGIN=true node node_modules/strapi-helper-plugin/lib/server",
"generate": "node node_modules/plop/plop.js --plopfile node_modules/strapi-helper-plugin/lib/internals/generators/index.js",
"lint": "node node_modules/strapi-helper-plugin/node_modules/.bin/eslint --ignore-path .gitignore --config node_modules/strapi-helper-plugin/lib/internals/eslint/.eslintrc.json admin",
"pretest": "npm run lint",
"prettier": "prettier --single-quote --trailing-comma es5 --write \"{admin,__{tests,mocks}__}/**/*.js\"",
"prettier": "node node_modules/strapi-helper-plugin/node_modules/.bin/prettier --single-quote --trailing-comma es5 --write \"{admin,__{tests,mocks}__}/**/*.js\"",
"test": "echo Tests are not implemented.",
"prepublish": "npm run build",
"postinstall": "node node_modules/strapi-helper-plugin/lib/internals/scripts/postinstall.js"
},
"dependencies": {
"prop-types": "^15.5.10",
"react-select": "^1.0.0-rc.5",
"strapi-helper-plugin": "3.0.0-alpha.6.4"
"prepublishOnly": "npm run build"
},
"devDependencies": {
"cross-env": "^5.1.1",
"eslint": "^4.11.0",
"eslint-config-airbnb": "^15.1.0",
"eslint-config-airbnb-base": "^11.3.2",
"eslint-config-prettier": "^2.7.0",
"eslint-import-resolver-webpack": "^0.8.3",
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0",
"eslint-plugin-redux-saga": "^0.4.0",
"plop": "^1.9.0",
"prettier": "^1.8.2",
"rimraf": "^2.6.2",
"webpack": "^3.8.1"
"react-select": "^1.0.0-rc.5",
"strapi-helper-plugin": "3.0.0-alpha.6.4"
}
}

View File

@ -8,50 +8,27 @@
"description": "content-type-builder.plugin.description"
},
"scripts": {
"analyze:clean": "rimraf stats.json",
"analyze:clean": "node node_modules/strapi-helper-plugin/node_modules/.bin/rimraf stats.json",
"preanalyze": "npm run analyze:clean",
"analyze": "node node_modules/strapi-helper-plugin/lib/internals/scripts/analyze.js",
"prebuild": "npm run build:clean && npm run test",
"build": "cross-env NODE_ENV=production webpack --config node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress",
"build:clean": "rimraf admin/build",
"start": "cross-env NODE_ENV=development node node_modules/strapi-helper-plugin/lib/server",
"generate": "node_modules/plop/plop.js --plopfile node_modules/strapi-helper-plugin/lib/internals/generators/index.js",
"lint": "eslint --ignore-path .gitignore --config node_modules/strapi-helper-plugin/lib/internals/eslint/.eslintrc.json admin",
"build": "node node_modules/strapi-helper-plugin/node_modules/.bin/cross-env NODE_ENV=production node node_modules/strapi-helper-plugin/node_modules/.bin/webpack --config node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress",
"build:clean": "node node_modules/strapi-helper-plugin/node_modules/.bin/rimraf admin/build",
"start": "node node_modules/strapi-helper-plugin/node_modules/.bin/cross-env NODE_ENV=development node node_modules/strapi-helper-plugin/lib/server",
"generate": "node node_modules/plop/plop.js --plopfile node_modules/strapi-helper-plugin/lib/internals/generators/index.js",
"lint": "node node_modules/strapi-helper-plugin/node_modules/.bin/eslint --ignore-path .gitignore --config node_modules/strapi-helper-plugin/lib/internals/eslint/.eslintrc.json admin",
"pretest": "npm run lint",
"prettier": "prettier --single-quote --trailing-comma es5 --write \"{admin,__{tests,mocks}__}/**/*.js\"",
"prettier": "node node_modules/strapi-helper-plugin/node_modules/.bin/prettier --single-quote --trailing-comma es5 --write \"{admin,__{tests,mocks}__}/**/*.js\"",
"test": "echo Tests are not implemented.",
"prepublish": "npm run build",
"postinstall": "node node_modules/strapi-helper-plugin/lib/internals/scripts/postinstall.js"
"prepublishOnly": "npm run build"
},
"dependencies": {
"bootstrap": "^4.0.0-alpha.6",
"classnames": "^2.2.5",
"pluralize": "^7.0.0",
"prop-types": "^15.5.10",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-transition-group": "^1.2.0",
"reactstrap": "^4.8.0",
"strapi-generate": "3.0.0-alpha.6.4",
"strapi-generate-api": "3.0.0-alpha.6.4",
"strapi-helper-plugin": "3.0.0-alpha.6.4"
"strapi-generate-api": "3.0.0-alpha.6.4"
},
"devDependencies": {
"cross-env": "^5.1.1",
"eslint": "^4.11.0",
"eslint-config-airbnb": "^15.1.0",
"eslint-config-airbnb-base": "^11.3.2",
"eslint-config-prettier": "^2.7.0",
"eslint-import-resolver-webpack": "^0.8.3",
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0",
"eslint-plugin-redux-saga": "^0.4.0",
"plop": "^1.9.0",
"prettier": "^1.8.2",
"rimraf": "^2.6.2",
"webpack": "^3.8.1"
"strapi-helper-plugin": "3.0.0-alpha.6.4"
},
"author": {
"name": "Strapi team",
@ -66,7 +43,7 @@
}
],
"engines": {
"node": ">= 7.0.0",
"node": ">= 8.0.0",
"npm": ">= 3.0.0"
},
"license": "MIT"

View File

@ -8,47 +8,24 @@
"description": "settings-manager.plugin.description"
},
"scripts": {
"analyze:clean": "rimraf stats.json",
"analyze:clean": "node node_modules/strapi-helper-plugin/node_modules/.bin/rimraf stats.json",
"preanalyze": "npm run analyze:clean",
"analyze": "node node_modules/strapi-helper-plugin/lib/internals/scripts/analyze.js",
"prebuild": "npm run build:clean && npm run test",
"build": "cross-env NODE_ENV=production webpack --config node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress",
"build:clean": "rimraf admin/build",
"start": "cross-env NODE_ENV=development node node_modules/strapi-helper-plugin/lib/server",
"generate": "plop --plopfile node_modules/strapi-helper-plugin/lib/internals/generators/index.js",
"lint": "eslint --ignore-path .gitignore --config node_modules/strapi-helper-plugin/lib/internals/eslint/.eslintrc.json admin",
"build": "node node_modules/strapi-helper-plugin/node_modules/.bin/cross-env NODE_ENV=production node node_modules/strapi-helper-plugin/node_modules/.bin/webpack --config node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress",
"build:clean": "node node_modules/strapi-helper-plugin/node_modules/.bin/rimraf admin/build",
"start": "node node_modules/strapi-helper-plugin/node_modules/.bin/cross-env NODE_ENV=development node node_modules/strapi-helper-plugin/lib/server",
"generate": "node node_modules/strapi-helper-plugin/node_modules/.bin/plop --plopfile node_modules/strapi-helper-plugin/lib/internals/generators/index.js",
"lint": "node node_modules/strapi-helper-plugin/node_modules/.bin/eslint --ignore-path .gitignore --config node_modules/strapi-helper-plugin/lib/internals/eslint/.eslintrc.json admin",
"pretest": "npm run lint",
"prettier": "prettier --single-quote --trailing-comma es5 --write \"{admin,__{tests,mocks}__}/**/*.js\"",
"prettier": "node node_modules/strapi-helper-plugin/node_modules/.bin/prettier --single-quote --trailing-comma es5 --write \"{admin,__{tests,mocks}__}/**/*.js\"",
"test": "echo Tests are not implemented.",
"prepublish": "npm run build",
"postinstall": "node node_modules/strapi-helper-plugin/lib/internals/scripts/postinstall.js"
},
"dependencies": {
"bootstrap": "^4.0.0-alpha.6",
"flag-icon-css": "^2.8.0",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-select": "^1.0.0-rc.5",
"react-transition-group": "^1.2.0",
"reactstrap": "^4.8.0",
"strapi-helper-plugin": "3.0.0-alpha.6.4"
"prepublishOnly": "npm run build"
},
"devDependencies": {
"cross-env": "^5.1.1",
"eslint": "^4.11.0",
"eslint-config-airbnb": "^15.1.0",
"eslint-config-airbnb-base": "^11.3.2",
"eslint-config-prettier": "^2.7.0",
"eslint-import-resolver-webpack": "^0.8.3",
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0",
"eslint-plugin-redux-saga": "^0.4.0",
"plop": "^1.9.0",
"prettier": "^1.8.2",
"rimraf": "^2.6.2",
"webpack": "^3.8.1"
"flag-icon-css": "^2.8.0",
"react-select": "^1.0.0-rc.5",
"strapi-helper-plugin": "3.0.0-alpha.6.4"
},
"author": {
"name": "Strapi team",
@ -63,7 +40,7 @@
}
],
"engines": {
"node": ">= 7.0.0",
"node": ">= 8.0.0",
"npm": ">= 3.0.0"
},
"license": "MIT"

View File

@ -7,12 +7,12 @@ try {
packages.filter(pkg => pkg.indexOf('strapi') !== -1).forEach(pkg => {
const packageJSON = JSON.parse(fs.readFileSync(path.resolve(process.cwd(), 'packages', pkg, 'package.json'), 'utf8'));
Object.keys(packageJSON.dependencies).filter(dependency => dependency.indexOf('strapi-') !== -1).forEach(dependency => {
Object.keys(packageJSON.dependencies || []).filter(dependency => dependency.indexOf('strapi-') !== -1).forEach(dependency => {
packageJSON.dependencies[dependency] = 'file:../' + dependency;
});
if (packageJSON.devDependencies) {
Object.keys(packageJSON.devDependencies).filter(devDependency => devDependency.indexOf('strapi-') !== -1).forEach(devDependency => {
Object.keys(packageJSON.devDependencies || []).filter(devDependency => devDependency.indexOf('strapi-') !== -1).forEach(devDependency => {
packageJSON.devDependencies[devDependency] = 'file:../' + devDependency;
});
}

View File

@ -12,12 +12,12 @@ try {
packageJSON.version = pkgJSON.version;
Object.keys(packageJSON.dependencies).filter(dependency => dependency.indexOf('strapi-') !== -1).forEach(dependency => {
Object.keys(packageJSON.dependencies || []).filter(dependency => dependency.indexOf('strapi-') !== -1).forEach(dependency => {
packageJSON.dependencies[dependency] = pkgJSON.version;
});
if (packageJSON.devDependencies) {
Object.keys(packageJSON.devDependencies).filter(devDependency => devDependency.indexOf('strapi-') !== -1).forEach(devDependency => {
Object.keys(packageJSON.devDependencies || []).filter(devDependency => devDependency.indexOf('strapi-') !== -1).forEach(devDependency => {
packageJSON.devDependencies[devDependency] = pkgJSON.version;
});
}

View File

@ -26,6 +26,7 @@ shell.exec('npm install ../strapi-utils');
shell.exec('npm install ../strapi-helper-plugin');
shell.rm('-f', 'package-lock.json');
shell.exec('npm link');
shell.exec('npm run build');
shell.cd('../strapi-generate-admin');
shell.exec('npm install ../strapi-admin');
@ -47,11 +48,13 @@ shell.cd('../strapi-plugin-content-manager');
shell.exec('npm install ../strapi-helper-plugin');
shell.rm('-f', 'package-lock.json');
shell.exec('npm link');
shell.exec('npm run build');
shell.cd('../strapi-plugin-settings-manager');
shell.exec('npm install ../strapi-helper-plugin');
shell.rm('-f', 'package-lock.json');
shell.exec('npm link');
shell.exec('npm run build');
shell.cd('../strapi-plugin-content-type-builder');
shell.exec('npm install ../strapi-helper-plugin');
@ -59,6 +62,7 @@ shell.exec('npm install ../strapi-generate');
shell.exec('npm install ../strapi-generate-api');
shell.rm('-f', 'package-lock.json');
shell.exec('npm link');
shell.exec('npm run build');
// Log installation duration.
const installationEndDate = new Date();