[Tests] build tests first, so CI can build/test in different stages
Showing
- .babelrc 8 additions, 0 deletions.babelrc
- .github/workflows/node.yml 37 additions, 5 deletions.github/workflows/node.yml
- .gitignore 1 addition, 0 deletions.gitignore
- .npmignore 1 addition, 0 deletions.npmignore
- .nycrc 0 additions, 1 deletion.nycrc
- package.json 9 additions, 6 deletionspackage.json
- test/mocha.opts 1 addition, 2 deletionstest/mocha.opts
... | @@ -5,22 +5,23 @@ | ... | @@ -5,22 +5,23 @@ |
"main": "index.js", | "main": "index.js", | ||
"scripts": { | "scripts": { | ||
"prebuild": "npm run clean", | "prebuild": "npm run clean", | ||
"build": "npm run build:cjs && npm run build:esm && npm run build:css -- --optimize ", | "build": "npm run build:cjs && npm run build:esm && npm run build:css -- --optimize", | ||
"postbuild": "npm run build:test", | |||
"build:cjs": "BABEL_ENV=cjs babel src/ -d lib/", | "build:cjs": "BABEL_ENV=cjs babel src/ -d lib/", | ||
"build:esm": "BABEL_ENV=esm babel src/ -d esm/", | "build:esm": "BABEL_ENV=esm babel src/ -d esm/", | ||
"build:test": "BABEL_ENV=test babel test/ -d test-build/", | |||
"prebuild:css": "rimraf lib/css && mkdirp lib/css", | "prebuild:css": "rimraf lib/css && mkdirp lib/css", | ||
"build:css": "node scripts/buildCSS.js", | "build:css": "node scripts/buildCSS.js", | ||
"clean": "rimraf lib esm", | "clean": "rimraf lib esm test-build", | ||
"lint": "eslint --ext .js,.jsx src test", | "lint": "eslint --ext .js,.jsx src test", | ||
"mocha": "mocha ./test/_helpers", | "mocha": "mocha ./test-build/_helpers", | ||
"storybook:uninstall": "npm uninstall --no-save @storybook/react && rimraf node_modules/@storybook node_modules/react-modal node_modules/react-dom-factories", | "storybook:uninstall": "npm uninstall --no-save @storybook/react && rimraf node_modules/@storybook node_modules/react-modal node_modules/react-dom-factories", | ||
"react": "NPM_CONFIG_LEGACY_PEER_DEPS=true enzyme-adapter-react-install 16", | "react": "NPM_CONFIG_LEGACY_PEER_DEPS=true enzyme-adapter-react-install 16", | ||
"pretest": "npm run --silent lint", | "pretest": "npm run --silent lint", | ||
"pretests-only": "npm run react", | |||
"tests-only": "cross-env NODE_ENV=test nyc npm run mocha --silent", | "tests-only": "cross-env NODE_ENV=test nyc npm run mocha --silent", | ||
"pretests-karma": "npm run react", | "pretests-karma": "npm run react", | ||
"tests-karma": "karma start", | "tests-karma": "karma start", | ||
"test": "npm run build && npm run tests-only", | "test": "npm run react && npm run build && npm run build:test && npm run tests-only", | ||
"storybook": "start-storybook -p 6006", | "storybook": "start-storybook -p 6006", | ||
"storybook:css": "npm run build:css && start-storybook -p 6006 -c .storybook-css", | "storybook:css": "npm run build:css && start-storybook -p 6006 -c .storybook-css", | ||
"tag": "git tag v$npm_package_version", | "tag": "git tag v$npm_package_version", | ||
... | @@ -64,12 +65,14 @@ | ... | @@ -64,12 +65,14 @@ |
"airbnb-js-shims": "^2.2.1", | "airbnb-js-shims": "^2.2.1", | ||
"aphrodite": "^2.4.0", | "aphrodite": "^2.4.0", | ||
"babel-loader": "^8.2.2", | "babel-loader": "^8.2.2", | ||
"babel-plugin-import-path-replace": "^0.1.0", | |||
"babel-plugin-inline-react-svg": "^1.1.2", | "babel-plugin-inline-react-svg": "^1.1.2", | ||
"babel-plugin-inline-svg": "^1.2.0", | "babel-plugin-inline-svg": "^1.2.0", | ||
"babel-plugin-istanbul": "^5.2.0", | "babel-plugin-istanbul": "^5.2.0", | ||
"babel-plugin-transform-replace-object-assign": "^2.0.0", | "babel-plugin-transform-replace-object-assign": "^2.0.0", | ||
"babel-preset-airbnb": "^4.5.0", | "babel-preset-airbnb": "^4.5.0", | ||
"chai": "^4.2.0", | "chai": "^4.2.0", | ||
"cheerio": "=1.0.0-rc.3", | |||
"clean-css": "^4.2.3", | "clean-css": "^4.2.3", | ||
"cross-env": "^5.2.1", | "cross-env": "^5.2.1", | ||
"enzyme": "^3.11.0", | "enzyme": "^3.11.0", | ||
... | @@ -104,7 +107,7 @@ | ... | @@ -104,7 +107,7 @@ |
"rimraf": "^2.7.1", | "rimraf": "^2.7.1", | ||
"safe-publish-latest": "^1.1.4", | "safe-publish-latest": "^1.1.4", | ||
"sass-loader": "^7.3.1", | "sass-loader": "^7.3.1", | ||
"sinon": "^8.1.1", | "sinon": "^7.5.0", | ||
"sinon-sandbox": "^2.0.6", | "sinon-sandbox": "^2.0.6", | ||
"style-loader": "^0.20.3", | "style-loader": "^0.20.3", | ||
"typescript": "*", | "typescript": "*", | ||
... | ... |
Please register or sign in to comment