refactor: es6 building and linting

This commit is contained in:
harttle
2018-08-16 23:14:12 +08:00
parent 5f634b0b5e
commit 19891b2df0
68 changed files with 1636 additions and 1575 deletions
+13 -7
View File
@@ -2,15 +2,19 @@
"name": "liquidjs",
"version": "5.2.0",
"description": "Liquid template engine by pure JavaScript: compatible to shopify, easy to extend.",
"main": "src/index.js",
"main": "dist/index.js",
"scripts": {
"lint": "eslint .",
"test": "mocha --recursive",
"coverage": "cross-env NODE_ENV=test istanbul cover --report html ./node_modules/mocha/bin/_mocha -- -R spec --recursive",
"lcov": "cross-env NODE_ENV=test istanbul cover --report lcovonly ./node_modules/mocha/bin/_mocha -- -R spec --recursive",
"dist": "npm run browserify && npm run uglify",
"browserify": "browserify index.js -s Liquid --ignore path -t [ babelify --global true --presets [ es2015 ] ] > dist/liquid.js",
"test": "mocha --require babel-core/register --recursive",
"coverage": "nyc report --require babel-core/register mocha test/ --recursive ",
"coveralls": "nyc report --reporter=text-lcov --require babel-core/register mocha test/ --recursive | coveralls",
"dist": "npm run babelify && npm run browserify && npm run uglify",
"babelify": "babel src -d dist",
"browserify": "browserify dist/index.js -s Liquid --ignore path --global true > dist/liquid.js",
"uglify": "uglifyjs dist/liquid.js --compress warnings=false --mangle --output dist/liquid.min.js",
"demo:browser": "echo open http://localhost:8080/demo/browser && http-server",
"demo:nodejs": "node ./demo/nodejs/index.js",
"demo:express": "cd ./demo/express/ && npm start",
"preversion": "npm run lint && npm test",
"version": "npm run dist && git add -A dist",
"postversion": "git push && git push --tags"
@@ -42,7 +46,7 @@
"fs": false
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-core": "^6.26.3",
"babel-preset-es2015": "^6.24.1",
"babelify": "^8.0.0",
"browserify": "^16.2.2",
@@ -58,10 +62,12 @@
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-standard": "^3.0.1",
"express": "^4.16.1",
"http-server": "^0.11.1",
"istanbul": "^0.4.5",
"jsdom": "^11.5.1",
"mocha": "^5.2.0",
"mock-fs": "^4.4.1",
"nyc": "^12.0.2",
"sinon": "^6.1.4",
"sinon-chai": "^3.2.0",
"supertest": "^3.0.0",