Skip to content

Commit 4b85883

Browse files
authored
Merge pull request #14 from oger000/pr/npm-build
switch build-tools to npm
2 parents da90fc7 + 417841d commit 4b85883

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

Diff for: Makefile

-10
This file was deleted.

Diff for: README.md

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ var sql = sqlParser.stringify(ast);
5454

5555
- ${value} like value place holder support.
5656

57+
## Build
58+
59+
- Run `npm run build` to build the distributable.
60+
5761
## LICENSE
5862

5963
MIT

Diff for: package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
"description": "",
55
"main": "./dist/parser/sqlParser.js",
66
"scripts": {
7-
"test": "make test",
8-
"benchmark": "node test/benchmark.js"
7+
"build": "jison -m js ./src/sqlParser.jison -o ./dist/parser/sqlParser.js && npm run build-concat",
8+
"build-concat": "concat -o ./dist/parser/sqlParser.js ./dist/parser/sqlParser.js src/stringify.js src/suffix.js",
9+
"postbuild": "npm run test:build",
10+
"test:all": "mocha --require babel-register",
11+
"test:build": "mocha 'test/*.test.js'",
12+
"test:benchmark": "mocha test/benchmark.js"
913
},
1014
"repository": {
1115
"type": "git",
@@ -25,6 +29,7 @@
2529
"babel-preset-es2015": "^6.22.0",
2630
"babel-register": "^6.22.0",
2731
"benchmark": "^2.1.3",
32+
"concat": "^1.0.3",
2833
"debug": "^3.1.0",
2934
"jison": "^0.4.17",
3035
"mocha": "^3.2.0"

0 commit comments

Comments
 (0)