change behaviour of tests and browser testing/build

This commit is contained in:
Sebastian McKenzie
2014-11-04 08:03:52 +11:00
parent 225754ae12
commit 2a0efceef5
15 changed files with 143 additions and 167 deletions

View File

@@ -1,4 +1,6 @@
BROWSERIFY_CMD = node_modules/browserify/bin/cmd.js
ISTANBUL_CMD = node_modules/istanbul/lib/cli.js cover
UGLIFY_CMD = node_modules/uglify-js/bin/uglifyjs
JSHINT_CMD = node_modules/jshint/bin/jshint
MOCHA_CMD = node_modules/mocha/bin/_mocha
@@ -26,8 +28,13 @@ test-travis:
if test -n "$$CODECLIMATE_REPO_TOKEN"; then codeclimate < coverage/lcov.info; fi
test-browser:
make build
node bin/generate-browser-test >dist/6to5-test.js
mkdir -p dist
node bin/cache-templates
node bin/cache-tests
node $(BROWSERIFY_CMD) -e test/_browser.js >dist/6to5-test.js
rm -rf templates.json tests.json
test -n "`which open`" && open test/browser.html
build:
@@ -35,8 +42,8 @@ build:
node bin/cache-templates
browserify lib/6to5/browser.js -s to5 >dist/6to5.js
uglifyjs dist/6to5.js >dist/6to5.min.js
node $(BROWSERIFY_CMD) lib/6to5/browser.js -s to5 >dist/6to5.js
node $(UGLIFY_CMD) dist/6to5.js >dist/6to5.min.js
rm -rf templates.json