Skip to content

Commit

Permalink
Merge pull request #2305 from FormidableLabs/chore/move-tests-moar-build
Browse files Browse the repository at this point in the history
Build enhancements for move tests PR
  • Loading branch information
scottrippey authored Jun 17, 2022
2 parents a7bbb97 + a4a3666 commit 7c797ba
Show file tree
Hide file tree
Showing 62 changed files with 198 additions and 71 deletions.
39 changes: 30 additions & 9 deletions package-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,15 @@ module.exports = {
packages: "lerna exec --ignore victory-vendor -- nps typecheck.src"
},
types: {
base: "tsc -p ./tsconfig.build.json --emitDeclarationOnly --rootDir src",
lib: "nps types.base -- -- --outDir lib",
es: "nps types.base -- -- --outDir es"
create:
"tsc -p ./tsconfig.build.json --emitDeclarationOnly --rootDir src",
"create-lib": "nps types.create -- -- --outDir lib",
"create-es": "nps types.create -- -- --outDir es",
copy: "cpx 'src/**/*.d.ts'",
"copy-lib": "nps types.copy -- -- lib",
"copy-es": "nps types.copy -- -- es",
lib: npsUtils.concurrent.nps("types.create-lib", "types.copy-lib"),
es: npsUtils.concurrent.nps("types.create-es", "types.copy-es")
},
check: {
ci: npsUtils.series.nps(
Expand All @@ -95,11 +101,26 @@ module.exports = {
default: npsUtils.series.nps("lint", "test")
},
watch: {
es: "lerna exec --parallel --ignore victory-native --ignore victory-vendor -- cross-env BABEL_ENV=es babel src --out-dir es --config-file ../../.babelrc.build.js --copy-files --extensions .tsx,.ts,.jsx,.js --watch",
lib: "lerna exec --parallel --ignore victory-native --ignore victory-vendor -- cross-env BABEL_ENV=commonjs babel src --out-dir lib --config-file ../../.babelrc.build.js --copy-files --extensions .tsx,.ts,.jsx,.js --watch",
core: npsUtils.concurrent.nps("watch.es", "watch.lib"),
// `victory-vendor` is built 1x up front and not watched.
default: npsUtils.series.nps("build-package-libs-vendor", "watch.core")
default: npsUtils.series.nps("build-package-libs-vendor", "watch.all"),
all: 'lerna exec --parallel --ignore victory-native --ignore victory-vendor "nps watch.core"',
core: npsUtils.concurrent.nps("watch.es", "watch.lib"),
lib: npsUtils.concurrent.nps(
"watch.babel-lib",
"watch.types-create-lib",
"watch.types-copy-lib"
),
es: npsUtils.concurrent.nps(
"watch.babel-es",
"watch.types-create-es",
"watch.types-copy-es"
),
"types-create-lib": "nps types.create-lib -- -- --watch",
"types-create-es": "nps types.create-es -- -- --watch",
"types-copy-lib": "nps types.copy-lib -- -- --watch",
"types-copy-es": "nps types.copy-es -- -- --watch",
"babel-es": "nps babel-es -- -- --watch",
"babel-lib": "nps babel-lib -- -- --watch"
},
clean: {
lib: "rimraf lib",
Expand All @@ -113,9 +134,9 @@ module.exports = {
"lerna version --no-git-tag-version --no-push --loglevel silly",
// TODO: organize build scripts once build perf is sorted out
"babel-es":
"cross-env BABEL_ENV=es babel src --out-dir es --config-file ../../.babelrc.build.js --copy-files --extensions .tsx,.ts,.jsx,.js",
"cross-env BABEL_ENV=es babel src --out-dir es --config-file ../../.babelrc.build.js --extensions .tsx,.ts,.jsx,.js",
"babel-lib":
"cross-env BABEL_ENV=commonjs babel src --out-dir lib --config-file ../../.babelrc.build.js --copy-files --extensions .tsx,.ts,.jsx,.js",
"cross-env BABEL_ENV=commonjs babel src --out-dir lib --config-file ../../.babelrc.build.js --extensions .tsx,.ts,.jsx,.js",
"build-es": npsUtils.series.nps("clean.es", "babel-es", "types.es"),
"build-lib": npsUtils.series.nps("clean.lib", "babel-lib", "types.lib"),
"build-libs": npsUtils.series.nps("build-lib", "build-es"),
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"babel-plugin-module-resolver": "^4.1.0",
"babel-preset-react-native": "^4.0.1",
"chromatic": "^5.0.0",
"cpx2": "^4.2.0",
"cross-env": "^7.0.3",
"emotion-theming": "^10.0.27",
"eslint": "^7.32.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/victory-area/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-area/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-axis/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-axis/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-bar/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-bar/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-box-plot/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-box-plot/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-brush-container/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-brush-container/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-brush-line/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-brush-line/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-candlestick/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-candlestick/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-canvas/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-canvas/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-chart/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-chart/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-core/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-create-container/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-create-container/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-cursor-container/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-cursor-container/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-errorbar/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-errorbar/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-group/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-group/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-histogram/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-histogram/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-legend/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-legend/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-line/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-line/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-native/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-native/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-pie/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-pie/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-polar-axis/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-polar-axis/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-scatter/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-scatter/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-selection-container/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-selection-container/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-shared-events/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-shared-events/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-stack/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-stack/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-tooltip/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-tooltip/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-vendor/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-voronoi-container/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-voronoi-container/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
2 changes: 1 addition & 1 deletion packages/victory-voronoi/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"exclude": ["**/*.test.*"]
"exclude": ["**/*.test.*", "es", "lib"]
}
3 changes: 2 additions & 1 deletion packages/victory-voronoi/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../../tsconfig.base.json"
"extends": "../../tsconfig.base.json",
"exclude": ["es", "lib"]
}
Loading

0 comments on commit 7c797ba

Please sign in to comment.