Skip to content

Commit

Permalink
Use yarn workspaces
Browse files Browse the repository at this point in the history
This allows to run yarn just once in the root directory and install all dependencies (see https://yarnpkg.com/lang/en/docs/workspaces/).
  • Loading branch information
darthmaim committed Sep 30, 2017
1 parent b5102b6 commit a955a1b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "api-snapshot-testing-frontend",
"version": "0.0.1",
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"private": true,
"workspaces": [
"frontend",
"server",
"worker"
]
}
4 changes: 1 addition & 3 deletions serve.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

echo "Installing dependencies..."
# npm install -g [email protected]
cd frontend && yarn && cd ..
cd server && yarn && cd ..
cd worker && yarn && cd ..
yarn

echo "Bundling frontend..."
cd frontend && npm run build && cd ..
Expand Down
1 change: 1 addition & 0 deletions server/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "api-snapshot-testing-server",
"version": "0.0.1",
"scripts": {
"start": "node src/index.js",
"format": "prettier --print-width 120 --no-semi --single-quote --no-bracket-spacing --write 'src/**/*.js' && standard --fix 'src/**/*.js'"
Expand Down
1 change: 1 addition & 0 deletions worker/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "api-snapshot-testing-worker",
"version": "0.0.1",
"scripts": {
"start": "node src/index.js",
"format": "prettier --print-width 120 --no-semi --single-quote --no-bracket-spacing --write 'src/**/*.js' && standard --fix 'src/**/*.js'"
Expand Down

0 comments on commit a955a1b

Please sign in to comment.