Navigation Menu

Skip to content

Commit

Permalink
feat(build): init support for development builds
Browse files Browse the repository at this point in the history
  • Loading branch information
plouc committed Dec 17, 2021
1 parent 20d5f05 commit 643a1c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
16 changes: 8 additions & 8 deletions Makefile
Expand Up @@ -124,31 +124,31 @@ packages-lint-fix: ##@1 packages run eslint on all packages with a fix option
@yarn eslint "./packages/*/{src,tests}/**/*.{js,ts,tsx}" --fix

package-test-cover-%: ##@1 packages run tests for a package with code coverage
@yarn jest -c ./packages/jest.config.js --rootDir . --coverage ./packages/${*}/tests
@export BABEL_ENV=development; yarn jest -c ./packages/jest.config.js --rootDir . --coverage ./packages/${*}/tests

package-test-%: ##@1 packages run tests for a package
@yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests
@export BABEL_ENV=development; yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests

package-watch-test-%: ##@1 packages run tests for a package and watch for changes
@yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests --watch
@export BABEL_ENV=development; yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests --watch

package-update-test-%: ##@1 packages run tests for a package and update its snapshots
@yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests -u
@export BABEL_ENV=development; yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests -u

package-watch-test-%: ##@1 packages run tests for a package and watch for changes
@yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests --watch
@export BABEL_ENV=development; yarn jest -c ./packages/jest.config.js --rootDir . ./packages/${*}/tests --watch

packages-test: ##@1 packages run tests for all packages
@echo "${YELLOW}Running test suites for all packages${RESET}"
@yarn jest -c ./packages/jest.config.js --rootDir . ./packages/*/tests
@export BABEL_ENV=development; yarn jest -c ./packages/jest.config.js --rootDir . ./packages/*/tests

packages-watch-test: ##@1 packages run tests for all packages and watch for changes
@echo "${YELLOW}Running test suites watcher for all packages${RESET}"
@yarn jest -c ./packages/jest.config.js --rootDir . ./packages/*/tests --watch
@export BABEL_ENV=development; yarn jest -c ./packages/jest.config.js --rootDir . ./packages/*/tests --watch

packages-test-cover: ##@1 packages run tests for all packages with code coverage
@echo "${YELLOW}Running test suites coverage for all packages${RESET}"
@yarn jest -c ./packages/jest.config.js --rootDir . --coverage ./packages/*/tests
@export BABEL_ENV=development; yarn jest -c ./packages/jest.config.js --rootDir . --coverage ./packages/*/tests

packages-types: ##@1 packages build all package types
@echo "${YELLOW}Building TypeScript types for all packages${RESET}"
Expand Down
5 changes: 4 additions & 1 deletion babel.config.js
@@ -1,7 +1,10 @@
module.exports = {
presets: [
['@babel/preset-env', { loose: true }],
['@babel/preset-react', { runtime: 'automatic' }],
['@babel/preset-react', {
development: process.env.BABEL_ENV === "development",
runtime: 'automatic'
}],
'@babel/preset-typescript',
],
}

0 comments on commit 643a1c9

Please sign in to comment.