Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

now uses trun instead of make

  • Loading branch information...
commit 5e4b81cf4d5970db81f80df8ca9cff981dc85005 1 parent 7b1e1bf
Dmitry Smolin authored
Showing with 33 additions and 15 deletions.
  1. +0 −14 Makefile
  2. +3 −1 package.json
  3. +30 −0 tasks.js
14 Makefile
View
@@ -1,14 +0,0 @@
-UGLIFY_OPTS = -c 'unused=false' -m
-
-client_all: client_js test_page
-
-test_page:
- browserify -e lib/test_page/client/init.js > public/static/test_page/js/test_page.js
-
-client_js:
- browserify ./client/export/browserify.js > client/apis.js
- browserify ./client/export/amd.js > client/apis.amd.js
- browserify ./client/export/global.js > client/apis.global.js
- uglifyjs client/apis.js $(UGLIFY_OPTS) > client/apis.min.js
- uglifyjs client/apis.amd.js $(UGLIFY_OPTS) > client/apis.amd.min.js
- uglifyjs client/apis.global.js $(UGLIFY_OPTS) > client/apis.global.min.js
4 package.json
View
@@ -20,7 +20,9 @@
"units": "~0.0.1",
"authen": "~0.0.1",
"ops": "~0.0.1",
- "inh": "~0.0.1"
+ "inh": "~0.0.1",
+
+ "trun": "~0.0.1"
},
"engines": {
"node": "~0.8.0"
30 tasks.js
View
@@ -0,0 +1,30 @@
+"use strict";
+var trun = require('trun');
+var prun = trun.wrapped.prun;
+
+var uglifyOpts = "-c 'unused=false' -m";
+
+var runner = new trun.Runner();
+runner.addTasks({
+ default:
+ 'clients',
+
+ clients: [
+ 'client',
+ 'testPage'
+ ],
+
+ client: [
+ prun('browserify client/export/browserify.js > client/apis.js'),
+ prun('browserify client/export/amd.js > client/apis.amd.js'),
+ prun('browserify client/export/global.js > client/apis.global.js'),
+
+ prun('uglifyjs client/apis.js ', uglifyOpts, ' > client/apis.min.js'),
+ prun('uglifyjs client/apis.amd.js ', uglifyOpts, ' > client/apis.amd.min.js'),
+ prun('uglifyjs client/apis.global.js ', uglifyOpts, ' > client/apis.global.min.js')
+ ],
+
+ testPage:
+ prun('browserify lib/test_page/client/init.js > public/static/test_page/js/test_page.js')
+});
+runner.start();
Please sign in to comment.
Something went wrong with that request. Please try again.