diff --git a/package.json b/package.json index 0fb6979ab67f45881518dc138bfcabf0e9545c0f..c6830d8670a20bc8099b680116db5ae42ae4ea27 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,10 @@ "lint": "npm run eslint && npm run tslint", "eslint": "eslint \"{src,test,bin}/**/*.js\"", "tslint": "tslint \"{src,test,bin}/**/*.ts\"", + "sloc": "sloc . --details --format cli-table --keys total,source,comment --exclude 'node_modules|doc' && sloc . --exclude 'node_modules|doc'", "pretest": "npm run lint", "test": "npm run test:phantomjs && npm run test:chrome", + "posttest": "npm run sloc", "test:phantomjs": "cross-env LC_ALL=C WECHATY_LOG=info WECHATY_HEAD=phantomjs ava --timeout=10m \"{src,test}/**/*.spec.js\"", "test:chrome": "cross-env LC_ALL=C WECHATY_LOG=silly WECHATY_HEAD=chrome ava --timeout=10m \"{src,test}/**/*.spec.js\"", "testdev": "cross-env LC_ALL=C WECHATY_LOG=silly ava --serial --verbose --fail-fast --timeout=3m", @@ -98,6 +100,7 @@ "eslint-plugin-ava": "^3.0.0", "qrcode-terminal": "^0.10.0", "sinon": "^1.17.5", + "sloc": "^0.1.11", "tslint": "^3.15.1", "tuling123-client": "0.0.1", "typescript": "^2.1.0-dev.20160830"