Skip to content

Commit

Permalink
Minify JS
Browse files Browse the repository at this point in the history
0.0.5
  • Loading branch information
mvasilkov committed Sep 17, 2013
1 parent c63ef52 commit 2eecbaf
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ jshint = node_modules/.bin/jshint
mocha = node_modules/.bin/mocha
browserify = node_modules/.bin/browserify
bower = node_modules/.bin/bower
uglifyjs = node_modules/.bin/uglifyjs
test_min = ./test_min.sh
npm = npm
git = git

all: jshint mocha test_client/assert.js bower_components

min: rssi.min.js test_min

node_modules: package.json
@ $(npm) install

Expand All @@ -22,5 +26,11 @@ test_client/assert.js: node_modules
bower_components: node_modules bower.json
@ $(bower) install

rssi.min.js: node_modules rssi.js
@ $(uglifyjs) rssi.js -c -m -o rssi.min.js

test_min: node_modules rssi.min.js
@ $(test_min)

clean:
@ $(git) clean -dfx
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rssi",
"version": "0.0.4",
"version": "0.0.5",
"description": "Ruby-like simple string interpolation",
"keywords": ["interpolation", "string", "formatting", "template"],
"author": "Mark Vasilkov (https://github.com/mvasilkov)",
Expand All @@ -19,7 +19,8 @@
"jshint": "2.x",
"mocha": "1.x",
"browserify": "2.x",
"bower": "1.x"
"bower": "1.x",
"uglify-js": "2.x"
},
"license": "MIT"
}
1 change: 1 addition & 0 deletions rssi.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions test_min.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
mv rssi.js _rssi.js
ln -s rssi.min.js rssi.js
make mocha
result=$?
mv _rssi.js rssi.js
exit $result

0 comments on commit 2eecbaf

Please sign in to comment.