Skip to content

Commit

Permalink
optimize [class]: Added strip-checks plugin
Browse files Browse the repository at this point in the history
Error checking is quite expensive in Node. This plugin removes
most of the error checking BS to improve speed

Signed-off-by: Vihan B <contact@vihan.org>
  • Loading branch information
vihanb committed Dec 10, 2016
1 parent 1808332 commit 9870c23
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
9 changes: 8 additions & 1 deletion .babelrc
Expand Up @@ -6,5 +6,12 @@
"babel-plugin-compile-cheddar",
"babel-plugin-tailcall-optimization",
"babel-plugin-loop-optimizer"
]
],
"env": {
"production": {
"plugins": [
"babel-plugin-strip-checks"
]
}
}
}
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -25,7 +25,7 @@ all: default
# The default task
# The **production** build
default: $(JC)
$(JC) $(JCFLAGS) --minified
NODE_ENV=production $(JC) $(JCFLAGS) --minified --compact true
$(BIN_MAKE)

# Development build task
Expand All @@ -52,4 +52,4 @@ test:$(TESTRUNNER) $(COVERAGE) $(TEST)
clean:
rm -rf ./dist/

.PHONY: test
.PHONY: test
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -47,7 +47,8 @@
"babel-istanbul": "^0.11.0",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-include": "^1.2.0",
"babel-plugin-loop-optimizer": "^1.2.3",
"babel-plugin-loop-optimizer": "^1.1.0",
"babel-plugin-strip-checks": "^1.0.3",
"babel-plugin-tailcall-optimization": "^1.0.11",
"babel-plugin-transform-class-properties": "^6.11.5",
"babel-preset-es2015": "^6.13.2",
Expand Down

0 comments on commit 9870c23

Please sign in to comment.