Skip to content

Commit

Permalink
Use preconstruct dev command (#1317)
Browse files Browse the repository at this point in the history
* test

* Try a new thing

* Try removing more stuff

* Upgrade preconstruct and remove flow mapping stuff

* Add max workers thing back to .flowconfig-ci
  • Loading branch information
emmatown authored Apr 17, 2019
1 parent 595aa85 commit 51e4856
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 52 deletions.
8 changes: 0 additions & 8 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,3 @@

[options]
suppress_comment=.*\\$FlowFixMe
module.name_mapper='^\(create-emotion\)$' -> '<PROJECT_ROOT>/packages/\1/src'
module.name_mapper='^\(emotion\)$' -> '<PROJECT_ROOT>/packages/\1/src'
module.name_mapper='^\(babel-plugin-emotion\)$' -> '<PROJECT_ROOT>/packages/\1/src'
module.name_mapper='^\(emotion-theming\)$' -> '<PROJECT_ROOT>/packages/\1/src'
module.name_mapper='^\(emotion-server\)$' -> '<PROJECT_ROOT>/packages/\1/src'
module.name_mapper='^\(create-emotion-server\)$' -> '<PROJECT_ROOT>/packages/\1/src'
module.name_mapper='^\(jest-emotion\)$' -> '<PROJECT_ROOT>/packages/\1/src'
module.name_mapper='^@emotion\/\([a-zA-Z0-9_\-]+\)$' -> '<PROJECT_ROOT>/packages/\1/src/index'
8 changes: 0 additions & 8 deletions .flowconfig-ci
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,4 @@

[options]
suppress_comment=.*\\$FlowFixMe
module.name_mapper='^\(create-emotion\)$' -> '<PROJECT_ROOT>/packages/\1/src'
module.name_mapper='^\(emotion\)$' -> '<PROJECT_ROOT>/packages/\1/src'
module.name_mapper='^\(babel-plugin-emotion\)$' -> '<PROJECT_ROOT>/packages/\1/src'
module.name_mapper='^\(emotion-theming\)$' -> '<PROJECT_ROOT>/packages/\1/src'
module.name_mapper='^\(emotion-server\)$' -> '<PROJECT_ROOT>/packages/\1/src'
module.name_mapper='^\(create-emotion-server\)$' -> '<PROJECT_ROOT>/packages/\1/src'
module.name_mapper='^\(jest-emotion\)$' -> '<PROJECT_ROOT>/packages/\1/src'
module.name_mapper='^@emotion\/\([a-zA-Z0-9_\-]+\)$' -> '<PROJECT_ROOT>/packages/\1/src/index'
server.max_workers=1
4 changes: 2 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ module.exports = api => {
(!filename.includes('no-babel') &&
needsBabelPluginEmotion(filename)) ||
filename.includes(path.join('__tests__', 'babel')),
plugins: ['babel-plugin-emotion-test']
plugins: ['babel-plugin-emotion']
},
{
test: filename =>
filename.includes('source-map') && needsBabelPluginEmotion(filename),
plugins: [['babel-plugin-emotion-test', { sourceMap: true }]]
plugins: [['babel-plugin-emotion', { sourceMap: true }]]
}
]
}
Expand Down
3 changes: 0 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const { aliases } = require('preconstruct')

module.exports = {
transform: {
'\\.css$': '<rootDir>/test/styleTransform.js',
Expand All @@ -15,7 +13,6 @@ module.exports = {
'/site/',
'/types/'
],
moduleNameMapper: aliases.jest(),
setupFilesAfterEnv: ['<rootDir>/test/testSetup.js'],
coveragePathIgnorePatterns: [
'/node_modules/',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"build:site": "lerna exec --scope emotion-site npm run build:site",
"flow": "flow",
"flow:check": "flow check --flowconfig-name=.flowconfig-ci",
"postinstall": "opencollective postinstall",
"postinstall": "opencollective postinstall && preconstruct dev",
"version-packages": "lerna version --preid=beta"
},
"resolutions": {
Expand Down Expand Up @@ -83,7 +83,7 @@
"polished": "^1.2.1",
"preact": "^8.2.9",
"preact-render-to-json": "^3.6.6",
"preconstruct": "^0.0.57",
"preconstruct": "^0.0.60",
"prettier": "1.14.3",
"raf": "^3.4.0",
"react": "^16.5.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/emotion/test/source-map/.babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"presets": ["babel-preset-emotion-dev"],
"plugins": [["babel-plugin-emotion-test", { "sourceMap": true }]]
"plugins": [["babel-plugin-emotion", { "sourceMap": true }]]
}
6 changes: 0 additions & 6 deletions scripts/babel-plugin-emotion-test/package.json

This file was deleted.

6 changes: 0 additions & 6 deletions scripts/babel-plugin-emotion-test/src/index.js

This file was deleted.

6 changes: 0 additions & 6 deletions scripts/babel-plugin-macros-register/package.json

This file was deleted.

6 changes: 0 additions & 6 deletions scripts/babel-plugin-macros-register/src/index.js

This file was deleted.

8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18548,10 +18548,10 @@ prebuild-install@^5.2.0:
tunnel-agent "^0.6.0"
which-pm-runs "^1.0.0"

preconstruct@^0.0.57:
version "0.0.57"
resolved "https://registry.yarnpkg.com/preconstruct/-/preconstruct-0.0.57.tgz#58c52168025b40a83dc7c3e5d380882d5037e221"
integrity sha512-xHPChHTpLrJE9AwixSEBS8w1whr8eNwDS/qqooT+2a2nKMBE2hUug2xrp+k7S4T+7fG5R4iGfyFQzXvfyxCo7w==
preconstruct@^0.0.60:
version "0.0.60"
resolved "https://registry.yarnpkg.com/preconstruct/-/preconstruct-0.0.60.tgz#e69aa664dad07858eab3acc0307d24908773d166"
integrity sha512-T2eq31R+s9VZjZ1bitmy+21yGCLFiUhU/Idlc1ZFVz0YqKk8JrAxlJM3Ah4vgMA4awvTuxTRSWRY2PyRhFWDmQ==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/core" "^7.1.2"
Expand Down

0 comments on commit 51e4856

Please sign in to comment.