Skip to content

Commit

Permalink
chore(scripts): Scripts Clean Up (#26)
Browse files Browse the repository at this point in the history
simplify scripts and move to jest-runner-tsc

* update travis to pass ci flag
* clean up scripts section
* remove static check script
* add ci to build script
* add tsc jest runner
* updated jest-runner-tsc to latest
* remove ci from build
* added type-check script

fixes #25
  • Loading branch information
kwelch authored and kwelch-eb committed May 9, 2018
1 parent 363634b commit f126268
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ cache: yarn
# Run the the validate script
# Temporarily also run the build script to make sure it works
# (will move this to the release step once that's implemented)
script: yarn run validate && yarn run build
script: yarn run validate --ci && yarn run build

7 changes: 7 additions & 0 deletions jest-tsc.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const baseConfig = require('./jest-base.config.js');

module.exports = Object.assign({}, baseConfig, {
runner: 'jest-runner-tsc',
displayName: 'tsc',
testMatch: ['<rootDir>/src/**/*.(ts|js)'],
});
16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,18 @@
"homepage": "https://github.com/eventbrite/eventbrite-sdk-javascript#readme",
"license": "MIT",
"scripts": {
"check:size": "bundlesize",
"precheck:size": "yarn gulp build:dist:min",
"check:static": "npm-run-all --parallel lint tsc",
"format": "prettier-eslint --write",
"lint": "jest --config=jest-lint.config.js",
"precommit": "lint-staged",
"gen:declarations": "tsc --p ./tsconfig.build.json",
"build": "npm-run-all build:targets gen:declarations",
"build:targets": "gulp build",
"prebuild:targets": "rm -rf dist && rm -rf lib",
"tsc": "tsc",
"postbuild": "bundlesize",
"start": "jest --watch",
"test": "jest --config=jest-test.config.js",
"test:ci": "yarn test --ci",
"test:watch": "yarn test --watch",
"validate": "npm-run-all --parallel check:static check:size test:ci",
"validate:watch": "jest --watch"
"type-check": "jest --config=jest-tsc.config.js",
"validate": "jest"
},
"lint-staged": {
"*.{ts,js}": [
Expand Down Expand Up @@ -83,6 +79,7 @@
"husky": "^0.14.3",
"jest": "^22.4.0",
"jest-runner-eslint": "^0.4.0",
"jest-runner-tsc": "^1.2.0",
"lint-staged": "^6.1.0",
"node": "^8.9.2",
"npm-run-all": "^4.1.2",
Expand All @@ -108,7 +105,8 @@
"jest": {
"projects": [
"jest-test.config.js",
"jest-lint.config.js"
"jest-lint.config.js",
"jest-tsc.config.js"
]
}
}
27 changes: 25 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
optionalDependencies:
chokidar "^1.6.1"

"@babel/[email protected]":
version "7.0.0-beta.35"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.35.tgz#04eeb6dca7efef8f65776a4c214157303b85ad51"
dependencies:
chalk "^2.0.0"
esutils "^2.0.2"
js-tokens "^3.0.0"

"@babel/[email protected]", "@babel/code-frame@^7.0.0-beta.35":
version "7.0.0-beta.40"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.40.tgz#37e2b0cf7c56026b4b21d3927cadf81adec32ac6"
Expand Down Expand Up @@ -1695,7 +1703,7 @@ end-of-stream@~0.1.5:
dependencies:
once "~1.3.0"

errno@^0.1.4:
errno@^0.1.4, errno@~0.1.7:
version "0.1.7"
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618"
dependencies:
Expand Down Expand Up @@ -3545,6 +3553,15 @@ jest-runner-eslint@^0.4.0:
throat "4.1.0"
worker-farm "1.5.0"

jest-runner-tsc@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/jest-runner-tsc/-/jest-runner-tsc-1.2.0.tgz#f15f299eb61b216ed5c1ba2014d2fbf0f75655a3"
dependencies:
"@babel/code-frame" "7.0.0-beta.35"
pify "^3.0.0"
throat "^4.1.0"
worker-farm "^1.5.2"

jest-runner@^22.4.0:
version "22.4.0"
resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-22.4.0.tgz#2509b82834ab4aa7e984ff464626397c556177a7"
Expand Down Expand Up @@ -6082,7 +6099,7 @@ textextensions@~1.0.0:
version "1.0.2"
resolved "https://registry.npmjs.org/textextensions/-/textextensions-1.0.2.tgz#65486393ee1f2bb039a60cbba05b0b68bd9501d2"

[email protected], throat@^4.0.0:
[email protected], throat@^4.0.0, throat@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a"

Expand Down Expand Up @@ -6487,6 +6504,12 @@ [email protected]:
errno "^0.1.4"
xtend "^4.0.1"

worker-farm@^1.5.2:
version "1.6.0"
resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.6.0.tgz#aecc405976fab5a95526180846f0dba288f3a4a0"
dependencies:
errno "~0.1.7"

wrap-ansi@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"
Expand Down

0 comments on commit f126268

Please sign in to comment.