diff --git a/Makefile b/Makefile deleted file mode 100644 index 670c77e..0000000 --- a/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -TEST = $(shell ls -S `find test -type f -name "*.test.js"`) - -test: - node --harmony ./node_modules/.bin/jison -m js ./src/sqlParser.jison -o ./dist/parser/sqlParser.js - cat src/stringify.js>> ./dist/parser/sqlParser.js - cat src/suffix.js>> ./dist/parser/sqlParser.js - ./node_modules/mocha/bin/mocha $(TEST) --require babel-register - -.PHONY: test - diff --git a/README.md b/README.md index 52e214a..642fa81 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,10 @@ var sql = sqlParser.stringify(ast); - ${value} like value place holder support. +## Build + +- Run `npm run build` to build the distributable. + ## LICENSE MIT diff --git a/package.json b/package.json index 547dbc6..1fe3d7c 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,12 @@ "description": "", "main": "./dist/parser/sqlParser.js", "scripts": { - "test": "make test", - "benchmark": "node test/benchmark.js" + "build": "jison -m js ./src/sqlParser.jison -o ./dist/parser/sqlParser.js && npm run build-concat", + "build-concat": "concat -o ./dist/parser/sqlParser.js ./dist/parser/sqlParser.js src/stringify.js src/suffix.js", + "postbuild": "npm run test:build", + "test:all": "mocha --require babel-register", + "test:build": "mocha 'test/*.test.js'", + "test:benchmark": "mocha test/benchmark.js" }, "repository": { "type": "git", @@ -25,6 +29,7 @@ "babel-preset-es2015": "^6.22.0", "babel-register": "^6.22.0", "benchmark": "^2.1.3", + "concat": "^1.0.3", "debug": "^3.1.0", "jison": "^0.4.17", "mocha": "^3.2.0"