Skip to content

Commit

Permalink
Consolidate yarn start / dev commands
Browse files Browse the repository at this point in the history
  • Loading branch information
damassi committed Dec 26, 2017
1 parent cfde979 commit 7a88440
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 22 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"acceptance-record": "sh scripts/acceptance_record.sh",
"assets": "sh scripts/assets.sh",
"deploy": "sh scripts/deploy.sh",
"dev": "sh scripts/dev.sh",
"mocha": "sh scripts/mocha.sh",
"start": "sh scripts/start.sh",
"test": "sh scripts/test.sh"
"test": "sh scripts/test.sh",
"webpack": "webpack"
},
"dependencies": {
"@artsy/express-reloadable": "^1.1.0",
"@artsy/express-reloadable": "^1.2.0",
"@artsy/reaction-force": "0.17.3",
"@artsy/stitch": "^1.3.1",
"accounting": "^0.4.1",
Expand Down
11 changes: 1 addition & 10 deletions scripts/assets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@ set -e -x
rm -rf public
mkdir public
mkdir public/assets
NODE_ENV=production browserify \
$(find desktop/assets mobile/assets -name '*.coffee') \
-p prundupify \
-g [ envify --NODE_ENV production ] \
-p bundle-collapser/plugin \
-t babelify \
-t caching-coffeeify \
-t jadeify \
-p [ factor-bundle -o 'cat | uglifyjs -b > public/assets/`basename $FILE .coffee`.js' ] \
| uglifyjs -b > public/assets/common.js
NODE_ENV=production webpack
stylus \
$(find desktop/assets mobile/assets -name '*.styl') \
--compress \
Expand Down
5 changes: 0 additions & 5 deletions scripts/dev.sh

This file was deleted.

8 changes: 7 additions & 1 deletion scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@ if [ ! -f "./.env" ]; then
echo -e "\033[1;31m WARNING: Missing .env file, see CONTRIBUTING.md. \033[0m"
fi

forever -c 'node -r dotenv/config --max_old_space_size=1024' . --colors
export $(cat .env | grep NODE_ENV | xargs)

if [ "$NODE_ENV" = "development" ]; then
node -r dotenv/config --max_old_space_size=1024 .
else
forever -c 'node -r dotenv/config --max_old_space_size=1024' . --colors
fi
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# yarn lockfile v1


"@artsy/express-reloadable@^1.1.2":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@artsy/express-reloadable/-/express-reloadable-1.1.2.tgz#4cf6313d70a0e046a5bd1e65c731665c75c8b134"
"@artsy/express-reloadable@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@artsy/express-reloadable/-/express-reloadable-1.2.0.tgz#acd68d38c48978b9bd6f383c6a7f017aa05c1d59"
dependencies:
chokidar "^1.7.0"

Expand Down

0 comments on commit 7a88440

Please sign in to comment.