Update dependencies and fix setup

This commit is contained in:
Aurélien Georget 2017-03-09 15:25:15 +01:00
parent a5a1d98961
commit 77051bde19
10 changed files with 26 additions and 99 deletions

1
.gitignore vendored
View File

@ -107,3 +107,4 @@ coverage
############################
packages/strapi-generate-new/files/public/
packages/*/yarn.lock

View File

@ -1,4 +1,4 @@
{
"lerna": "2.0.0-beta.30",
"lerna": "2.0.0-beta.36",
"version": "3.0.0-alpha.3"
}

View File

@ -1,6 +1,6 @@
{
"private": true,
"version": "3.0.0-alpha.1",
"version": "3.0.0-alpha.3",
"devDependencies": {
"assert": "~1.3.0",
"babel-eslint": "^6.1.2",
@ -13,7 +13,7 @@
"eslint-plugin-react": "^6.8.0",
"eslint-plugin-redux-saga": "^0.3.0",
"istanbul": "~0.4.2",
"lerna": "2.0.0-beta.30",
"lerna": "2.0.0-beta.36",
"mocha": "~2.4.5",
"mocha-lcov-reporter": "~1.2.0",
"pre-commit": "~1.1.2",

View File

@ -9,7 +9,7 @@ var progress = animateProgress('Generating stats');
// Generate stats.json file with webpack
shelljs.exec(
'webpack --config internals/webpack/webpack.prod.babel.js --profile --json > stats.json',
'node node_modules/webpack/bin/webpack --config internals/webpack/webpack.prod.babel.js --profile --json > stats.json',
addCheckMark.bind(null, callback) // Output a checkmark on completion
);

View File

@ -46,4 +46,4 @@ if (!exists(dllManifestPath)) {
}
// the BUILDING_DLL env var is set to avoid confusing the development environment
exec('cross-env BUILDING_DLL=true webpack --display-chunks --color --config internals/webpack/webpack.dll.babel.js')
exec('node node_modules/cross-env/bin/cross-env BUILDING_DLL=true node node_modules/webpack/bin/webpack --display-chunks --color --config internals/webpack/webpack.dll.babel.js')

View File

@ -1,73 +0,0 @@
#!/usr/bin/env node
var shell = require('shelljs');
var exec = require('child_process').exec;
var path = require('path');
var fs = require('fs');
var animateProgress = require('./helpers/progress');
var addCheckMark = require('./helpers/checkmark');
var readline = require('readline');
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdout.write('\n');
var interval = animateProgress('Cleaning old repository');
process.stdout.write('Cleaning old repository');
cleanRepo(function () {
clearInterval(interval);
process.stdout.write('\nInstalling dependencies... (This might take a while)');
setTimeout(function () {
readline.cursorTo(process.stdout, 0);
interval = animateProgress('Installing dependencies');
}, 500);
process.stdout.write('Installing dependencies');
installDeps(function (error) {
clearInterval(interval);
if (error) {
process.stdout.write(error);
}
deleteFileInCurrentDir('setup.js', function () {
process.stdout.write('\n');
interval = animateProgress('Initialising new repository');
process.stdout.write('Initialising new repository');
initGit(function () {
clearInterval(interval);
process.stdout.write('\nDone!');
process.exit(0);
});
});
});
});
/**
* Deletes the .git folder in dir
*/
function cleanRepo(callback) {
shell.rm('-rf', '.git/');
addCheckMark(callback);
}
/**
* Initializes git again
*/
function initGit(callback) {
exec('git init && git add . && git commit -m "Initial commit"', addCheckMark.bind(null, callback));
}
/**
* Deletes a file in the current directory
*/
function deleteFileInCurrentDir(file, callback) {
fs.unlink(path.join(__dirname, file), callback);
}
/**
* Installs dependencies
*/
function installDeps(callback) {
exec('npm install', addCheckMark.bind(null, callback));
}

View File

@ -9,21 +9,21 @@
"author": "Strapi",
"license": "MIT",
"scripts": {
"analyze:clean": "rimraf stats.json",
"analyze:clean": "node node_modules/rimraf/rimraf.js stats.json",
"preanalyze": "npm run analyze:clean",
"analyze": "node ./internals/scripts/analyze.js",
"extract-intl": "babel-node --presets es2015,stage-0 -- ./internals/scripts/extract-intl.js",
"npmcheckversion": "node ./internals/scripts/npmcheckversion.js",
"preinstall": "npm run npmcheckversion",
"postinstall": "npm run build:dll",
"prebuild": "npm run build:clean && npm run test",
"build": "cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p",
"build:clean": "npm run test:clean && rimraf ./build",
"prebuild": "npm run build:clean",
"build": "NODE_ENV=production node node_modules/cross-env/bin/cross-env node node_modules/webpack/bin/webpack --config ./internals/webpack/webpack.prod.babel.js --color --progress",
"build:clean": "npm run test:clean && node node_modules/rimraf/rimraf.js ./build",
"build:dll": "node ./internals/scripts/dependencies.js",
"start": "cross-env NODE_ENV=development node server",
"start:tunnel": "cross-env NODE_ENV=development ENABLE_TUNNEL=true node server",
"start": "node node_modules/cross-env/bin/cross-env NODE_ENV=development node server",
"start:tunnel": "node node_modules/cross-env/bin/cross-env NODE_ENV=development ENABLE_TUNNEL=true node server",
"start:production": "npm run build && npm run start:prod",
"start:prod": "cross-env NODE_ENV=production node server",
"start:prod": "node node_modules/cross-env/bin/cross-env NODE_ENV=production node server",
"pagespeed": "node ./internals/scripts/pagespeed.js",
"presetup": "npm i chalk shelljs",
"setup": "node ./internals/scripts/setup.js",
@ -32,13 +32,12 @@
"clean:all": "npm run analyze:clean && npm run test:clean && npm run build:clean",
"generate": "plop --plopfile internals/generators/index.js",
"lint": "npm run lint:js",
"lint:eslint": "eslint --ignore-path .gitignore --ignore-pattern internals/scripts",
"lint:eslint": "node node_modules/eslint/bin/eslint --ignore-path .gitignore --ignore-pattern internals/scripts",
"lint:js": "npm run lint:eslint -- . ",
"lint:css": "stylelint ./app/**/*.css",
"lint:staged": "lint-staged",
"pretest": "npm run test:clean && npm run lint",
"test:clean": "rimraf ./coverage",
"test": "cross-env NODE_ENV=test karma start internals/testing/karma.conf.js --single-run",
"test:clean": "node node_modules/rimraf/rimraf.js ./coverage",
"test": "node node_modules/cross-env/bin/cross-env NODE_ENV=test node node_modules/karma/bin/karma start internals/testing/karma.conf.js --single-run",
"test:watch": "npm run test -- --auto-watch --no-single-run",
"test:firefox": "npm run test -- --browsers Firefox",
"test:safari": "npm run test -- --browsers Safari",

View File

@ -1,6 +1,6 @@
{
"name": "strapi-plugin-content-manager",
"version": "0.0.0",
"version": "3.0.0-alpha.3",
"description": "Strapi Plugin - Content Manager",
"engines": {
"node": ">= 7.0.0",

View File

@ -38,25 +38,25 @@
"consolidate": "~0.14.0",
"delegates": "^1.0.0",
"kcors": "^2.2.0",
"koa": "^2.0.0-alpha.7",
"koa": "^2.1.0",
"koa-better-static": "^1.0.5",
"koa-bodyparser": "koajs/bodyparser#3.x",
"koa-bodyparser": "^4.1.0",
"koa-compose": "koajs/compose#next",
"koa-compress": "koajs/compress#v2.x",
"koa-compress": "^2.0.0",
"koa-convert": "^1.2.0",
"koa-favicon": "koajs/favicon#v2.x",
"koa-favicon": "^2.0.0",
"koa-generic-session": "^1.11.4",
"koa-i18n": "~1.2.0",
"koa-ip": "~0.1.0",
"koa-joi-router": "koajs/joi-router#await",
"koa-joi-router": "strapi/joi-router#await",
"koa-load-middlewares": "~1.0.0",
"koa-locale": "~1.2.0",
"koa-lusca": "~2.2.0",
"koa-mount": "koajs/mount#next",
"koa-mount": "^2.0.0",
"koa-proxy": "~0.7.0",
"koa-response-time": "koajs/response-time#v2.x",
"koa-response-time": "^2.0.0",
"koa-send": "koajs/send#2.x",
"koa-sslify": "turboMaCk/koa-sslify#koa2",
"koa-sslify": "^2.1.0",
"koa-views": "^5.0.2",
"lodash": "^4.16.5",
"node-schedule": "^1.2.0",

View File

@ -9,7 +9,7 @@ echo "${GREEN}Installing dependencies..."
npm install
echo "${GREEN}Bootstraping packages and building dashboard...${NC}"
echo "This can take few minutes (2-3)"
node node_modules/lerna/bin/lerna bootstrap
node node_modules/lerna/bin/lerna bootstrap --nohoist --stream
echo "${GREEN}Linking Strapi CLI...${NC}"
cd packages/strapi
npm link