code clean
Showing
... | ... | @@ -14,13 +14,12 @@ |
"DEFAULT_APIHOST": "api.chatie.io" | ||
}, | ||
"scripts": { | ||
"ts-node": "ts-node", | ||
"clean": "shx rm -fr dist/*", | ||
"dist": "npm run clean && tsc && shx cp src/puppet-web/*.js dist/src/puppet-web/", | ||
"doc": "npm run dist && echo '# Wechaty v'$(jq -r .version package.json)' Documentation\n* https://blog.chatie.io\n' > docs/index.md && jsdoc2md dist/src/{wechaty,room,contact,friend-request,message}.js dist/src/puppet-web/{friend-request,schema}.js>> docs/index.md", | ||
"coverage": "nyc report --reporter=text-lcov | coveralls", | ||
"changelog": "github_changelog_generator -u chatie -p wechaty && sed -i'.bak' /greenkeeper/d CHANGELOG.md && sed -i'.bak' '/An in-range update of/d' CHANGELOG.md && ts-node scripts/sort-contributiveness.ts < CHANGELOG.md > CHANGELOG.new.md 2>/dev/null && cat CHANGELOG.md >> CHANGELOG.new.md && mv CHANGELOG.new.md CHANGELOG.md", | ||
"doctor": "npm run check-node-version && ts-node bin/doctor", | ||
"clean": "shx rm -fr dist/*", | ||
"check-node-version": "check-node-version --node \">= 8.5\"", | ||
"lint": "npm run check-node-version && npm run lint:ts && npm run lint:es && npm run lint:sh", | ||
"lint:es": "eslint \"{bin,examples,scripts,src,tests}/**/*.js\" --ignore-pattern=\"tests/fixtures/**\"", | ||
... | ... | @@ -28,6 +27,7 @@ |
"lint:ts": "npm run clean && echo tslint v`tslint --version` && tslint --project tsconfig.json \"{bin,examples,scripts,src,tests}/**/*.ts\" --exclude \"tests/fixtures/**\" --exclude \"dist/\" && tsc --noEmit", | ||
"lint:sh": "bash -n bin/*.sh", | ||
"sloc": "sloc bin examples scripts src tests index.ts --details --format cli-table --keys total,source,comment && sloc bin examples scripts src tests index.ts", | ||
"ts-node": "ts-node", | ||
"test": "npm run clean && npm run lint && npm run test:unit:retry && npm run test:shell && npm run sloc", | ||
"test:linux": "npm run pretest && parallel ts-node -- ./src/**/*.spec.ts ./tests/**/*.spec.ts && npm run posttest", | ||
"test:pack": "npm run dist && export TMPDIR=/tmp/wechaty.$$ && npm pack && mkdir $TMPDIR && mv wechaty-*.*.*.tgz $TMPDIR && cp tests/fixtures/smoke-testing.js $TMPDIR && cd $TMPDIR && npm init -y && npm i wechaty-*.*.*.tgz && (for i in {1..3}; do node smoke-testing.js && break || sleep 1; done)", | ||
... | ... |
想要评论请 注册 或 登录