Skip to content

Commit

Permalink
Adding lerna
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurelsicoko committed Dec 7, 2016
1 parent 65bfce3 commit 43830c9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 54 deletions.
4 changes: 4 additions & 0 deletions lerna.json
@@ -0,0 +1,4 @@
{
"lerna": "2.0.0-beta.30",
"version": "3.0.0-alpha.1"
}
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -8,7 +8,8 @@
"mocha": "~2.4.5",
"mocha-lcov-reporter": "~1.2.0",
"pre-commit": "~1.1.2",
"xo": "~0.13.0"
"xo": "~0.13.0",
"lerna": "2.0.0-beta.30"
},
"xo": {
"space": true,
Expand Down
3 changes: 1 addition & 2 deletions packages/strapi-generate-admin/package.json
Expand Up @@ -18,8 +18,7 @@
"strapi-utils": "^3.0.0-alpha.1"
},
"scripts": {
"prepublish": "npm prune",
"postinstall": "cd files/admin && npm install"
"prepublish": "cd files/admin && npm run setup"
},
"author": {
"email": "hi@strapi.io",
Expand Down
2 changes: 1 addition & 1 deletion packages/strapi/package.json
Expand Up @@ -70,7 +70,7 @@
"strapi-utils": "^3.0.0-alpha.1"
},
"scripts": {
"prepublish": "npm prune"
"prepublish": "cd ./node_modules/koa-joi-router && sed -i.bu 's/await-busboy/co-busboy/' joi-router.js && npm install co-busboy"
},
"author": {
"email": "hi@strapi.io",
Expand Down
57 changes: 7 additions & 50 deletions scripts/setup.sh
@@ -1,54 +1,11 @@
#!/bin/sh
set -e

cd packages/strapi-utils
npm link
cd ../strapi-mongoose
npm link strapi-utils
npm link
cd ../strapi-bookshelf
npm link strapi-utils
npm link
cd ../strapi-generate-migrations
npm link strapi-bookshelf
npm link strapi-utils
npm link
cd ../strapi-generate
npm link strapi-utils
npm link
cd ../strapi-generate-admin
npm link strapi-utils
npm link
cd files/admin/public
npm install
npm run build
cd ../../../
cd ../strapi-generate-api
npm link
cd ../strapi-generate-policy
npm link
cd ../strapi-generate-service
npm link
cd ../strapi-generate-new
npm link strapi-utils
npm link
cd ../strapi
npm link strapi-generate-new
npm link strapi-generate
npm link strapi-generate-admin
npm link strapi-generate-api
npm link strapi-generate-policy
npm link strapi-generate-service
npm link strapi-generate-migrations
npm link strapi-mongoose
npm link strapi-utils
npm install
npm link
cd ./node_modules/koa-joi-router
sed -i.bu 's/await-busboy/co-busboy/' joi-router.js
npm install co-busboy
cd ..
cd ..
cd ..
cd ..
GREEN='\033[0;32m'
NC='\033[0m' # No Color

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

0 comments on commit 43830c9

Please sign in to comment.