Skip to content

Commit

Permalink
chore: try to let jest faster
Browse files Browse the repository at this point in the history
  • Loading branch information
BANG88 committed Mar 10, 2018
1 parent 494006a commit 916cf89
Showing 1 changed file with 41 additions and 37 deletions.
78 changes: 41 additions & 37 deletions package.json
Expand Up @@ -22,12 +22,7 @@
"bugs": {
"url": "http://github.com/ant-design/ant-design-mobile/issues"
},
"files": [
"dist",
"lib",
"es",
"scripts/update-tip.js"
],
"files": ["dist", "lib", "es", "scripts/update-tip.js"],
"license": "MIT",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -128,68 +123,77 @@
"webpack-visualizer-plugin": "^0.1.11"
},
"scripts": {
"lint": "npm run tslint && npm run srclint && npm run demolint && npm run stylelint && npm run applint",
"lint":
"npm run tslint && npm run srclint && npm run demolint && npm run stylelint && npm run applint",
"srclint": "eslint site scripts --ext '.js,.jsx'",
"tslint": "antd-tools run ts-lint && npm run compile && rm -rf lib",
"tslint-fix": "antd-tools run ts-lint-fix && npm run compile && rm -rf lib",
"demolint": "cross-env RUN_ENV=DEMO eslint components/*/demo/*.md --ext '.md'",
"demolint":
"cross-env RUN_ENV=DEMO eslint components/*/demo/*.md --ext '.md'",
"stylelint": "stylelint \"{site,components}/**/*.less\" --syntax less",
"stylelint-fix": "stylelint \"{site,components}/**/*.less\" --syntax less --fix",
"eslint-fix": "eslint --fix site scripts ./*.js --ext '.js,.jsx' && eslint-tinker ./components/*/demo/*.md",
"stylelint-fix":
"stylelint \"{site,components}/**/*.less\" --syntax less --fix",
"eslint-fix":
"eslint --fix site scripts ./*.js --ext '.js,.jsx' && eslint-tinker ./components/*/demo/*.md",
"applint": "eslint rn-kitchen-sink --ext '.js'",
"pre-publish": "npm run test:all && node ./scripts/build-less-entry",
"prepublish": "antd-tools run guard",
"prepare": "antd-tools run guard",
"prepublishOnly": "antd-tools run guard",
"test": "npm run test:rn && npm run test:web",
"test:rn": "jest --config .jest.native.js",
"test:web": "jest --config .jest.js",
"test:rn": "jest --config .jest.native.js --maxWorkers=4",
"test:web": "jest --config .jest.js --maxWorkers=4",
"test:all": "./scripts/test-all.sh",
"authors": "git log --format='%aN <%aE>' | sort -u | grep -v 'users.noreply.github.com' > AUTHORS.txt",
"authors":
"git log --format='%aN <%aE>' | sort -u | grep -v 'users.noreply.github.com' > AUTHORS.txt",
"dist": "cross-env BABEL_ENV=dist antd-tools run dist",
"compile": "cross-env BABEL_ENV=dist antd-tools run compile && npm run add-tip",
"compile":
"cross-env BABEL_ENV=dist antd-tools run compile && npm run add-tip",
"watch-tsc": "antd-tools run watch-tsc",
"clean": "antd-tools run clean",
"start": "cross-env NODE_ENV=development concurrently \"cross-env DEMO_ENV=react bisheng start -c ./site/bisheng.desktop.config.js\" \"cross-env DEMO_ENV=preact bisheng start -c ./site/bisheng.kitchen.config.js\"",
"start-hd": "cross-env NODE_ENV=development concurrently \"cross-env DEMO_ENV=react bisheng start -c ./site/bisheng.desktop.config.js\" \"cross-env DEMO_ENV=preact HD_ENV=hd bisheng start -c ./site/bisheng.kitchen.config.js\"",
"start-prod": "cross-env NODE_ENV=production concurrently \"cross-env DEMO_ENV=react bisheng start -c ./site/bisheng.desktop.config.js\" \"cross-env DEMO_ENV=preact bisheng start -c ./site/bisheng.kitchen.config.js\"",
"site": "cross-env NODE_ENV=production concurrently \"cross-env DEMO_ENV=react bisheng build -c ./site/bisheng.desktop.config.js\" \"cross-env DEMO_ENV=preact bisheng build -c ./site/bisheng.kitchen.config.js\" && node scripts/copy-app-res",
"start":
"cross-env NODE_ENV=development concurrently \"cross-env DEMO_ENV=react bisheng start -c ./site/bisheng.desktop.config.js\" \"cross-env DEMO_ENV=preact bisheng start -c ./site/bisheng.kitchen.config.js\"",
"start-hd":
"cross-env NODE_ENV=development concurrently \"cross-env DEMO_ENV=react bisheng start -c ./site/bisheng.desktop.config.js\" \"cross-env DEMO_ENV=preact HD_ENV=hd bisheng start -c ./site/bisheng.kitchen.config.js\"",
"start-prod":
"cross-env NODE_ENV=production concurrently \"cross-env DEMO_ENV=react bisheng start -c ./site/bisheng.desktop.config.js\" \"cross-env DEMO_ENV=preact bisheng start -c ./site/bisheng.kitchen.config.js\"",
"site":
"cross-env NODE_ENV=production concurrently \"cross-env DEMO_ENV=react bisheng build -c ./site/bisheng.desktop.config.js\" \"cross-env DEMO_ENV=preact bisheng build -c ./site/bisheng.kitchen.config.js\" && node scripts/copy-app-res",
"site-cdn": "cdn-tools run -c ./scripts/cdn-config.js",
"analysis": "npm run dist && node ./scripts/analysis",
"deploy": "npm run clean && npm run site && npm run site-cdn && bisheng gh-pages --push-only",
"deploy":
"npm run clean && npm run site && npm run site-cdn && bisheng gh-pages --push-only",
"pub": "cross-env BABEL_ENV=dist antd-tools run pub",
"rn-start": "node node_modules/react-native/local-cli/cli.js start",
"ios": "concurrently \"npm run watch-tsc\" \"npm run _ios\"",
"android": "concurrently \"npm run watch-tsc\" \"npm run _android\"",
"_ios": "node node_modules/react-native/local-cli/cli.js run-ios --project-path rn-kitchen-sink/ios",
"_android": "node node_modules/react-native/local-cli/cli.js run-android --root rn-kitchen-sink",
"build-rn-ios": "node scripts/rn-mkdir && node node_modules/react-native/local-cli/cli.js bundle --platform ios --dev false --entry-file rn-kitchen-sink/index.ios.js --bundle-output rn-kitchen-sink/ios/bundle/index.ios.bundle --assets-dest rn-kitchen-sink/ios/bundle",
"build-rn-android": "node scripts/rn-mkdir && node node_modules/react-native/local-cli/cli.js bundle --platform android --dev false --entry-file rn-kitchen-sink/index.android.js --bundle-output rn-kitchen-sink/android/bundle/index.android.bundle --assets-dest rn-kitchen-sink/android/bundle",
"build-rn": "npm run tsc && npm run build-rn-ios && npm run build-rn-android",
"_ios":
"node node_modules/react-native/local-cli/cli.js run-ios --project-path rn-kitchen-sink/ios",
"_android":
"node node_modules/react-native/local-cli/cli.js run-android --root rn-kitchen-sink",
"build-rn-ios":
"node scripts/rn-mkdir && node node_modules/react-native/local-cli/cli.js bundle --platform ios --dev false --entry-file rn-kitchen-sink/index.ios.js --bundle-output rn-kitchen-sink/ios/bundle/index.ios.bundle --assets-dest rn-kitchen-sink/ios/bundle",
"build-rn-android":
"node scripts/rn-mkdir && node node_modules/react-native/local-cli/cli.js bundle --platform android --dev false --entry-file rn-kitchen-sink/index.android.js --bundle-output rn-kitchen-sink/android/bundle/index.android.bundle --assets-dest rn-kitchen-sink/android/bundle",
"build-rn":
"npm run tsc && npm run build-rn-ios && npm run build-rn-android",
"lint-staged": "lint-staged",
"lint-staged:ts": "npm run tsc && node node_modules/tslint/bin/tslint -c node_modules/antd-tools/lib/tslint.json components/**/*.tsx",
"lint-staged:ts":
"npm run tsc && node node_modules/tslint/bin/tslint -c node_modules/antd-tools/lib/tslint.json components/**/*.tsx",
"lint-staged:es": "eslint ./.eslintrc.js ./webpack.config.js",
"lint-staged:demo": "cross-env RUN_ENV=DEMO eslint --ext '.md'",
"tsc": "antd-tools run tsc",
"add-tip": "node scripts/add-tip.js"
},
"lint-staged": {
"components/**/*.tsx": [
"lint-staged:ts"
],
"{tests,site,scripts,components}/**/*.{js,jsx}": [
"lint-staged:es"
],
"components/**/*.tsx": ["lint-staged:ts"],
"{tests,site,scripts,components}/**/*.{js,jsx}": ["lint-staged:es"],
"{site,components}/**/*.less": "stylelint",
"components/*/demo/*.md": [
"lint-staged:demo"
]
"components/*/demo/*.md": ["lint-staged:demo"]
},
"config": {
"port": 8001
},
"typings": "lib/index.d.ts",
"pre-commit": [
"lint-staged"
]
"pre-commit": ["lint-staged"]
}

0 comments on commit 916cf89

Please sign in to comment.