Reputation: 217
I am using Browserify to build my project, but the output file is ~1.5m. There's not that much source in it, so how do I strip out the non-production stuff?
BUILDDIR = public
MODULESDIR = ./node_modules/.bin
build:
@mkdir -p public & \
$(MODULESDIR)/browserify app/initialize.js \
-t node-underscorify \
-t [ babelify --presets [ es2015 ] ] \
-t [jstify --noMinify] \
-o $(BUILDDIR)/out.js -d
server:
$(MODULESDIR)/http-server &\
start: build server
clean:
@rm -rf public
.PHONY: clean
The project is Marionette and Backbone.
Upvotes: 1
Views: 35
Reputation: 3622
You can start by either removing the -d parameter, creating a dev task or event using the exorcist, as suggested in the browserify handbook.
On my setup i use budo as dev server and have separated make tasks for dev and release.
Upvotes: 1