Pass the browser version through Babel

This will allow to use ES2015 constructs in PEG.js code.

See #442.
redux
David Majda 8 years ago
parent 16f38f6380
commit 4e38617748

@ -74,7 +74,10 @@ browser:
echo ' * Licensed under the MIT license.' >> $(BROWSER_FILE_DEV)
echo ' */' >> $(BROWSER_FILE_DEV)
$(BROWSERIFY) --standalone peg $(MAIN_FILE) >> $(BROWSER_FILE_DEV)
$(BROWSERIFY) \
--standalone peg \
--transform [ babelify --presets [ es2015 ] --compact false ] \
$(MAIN_FILE) >> $(BROWSER_FILE_DEV)
$(UGLIFYJS) \
--mangle \

@ -48,6 +48,8 @@
"test": "make lint && make spec"
},
"devDependencies": {
"babel-preset-es2015": "6.14.0",
"babelify": "7.3.0",
"browserify": "13.1.0",
"eslint": "2.13.1",
"http-server": "0.9.0",

Loading…
Cancel
Save