Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[WIP] add jest transform #555
Conversation
| "build:babel": "babel-node src/cli.js --target=node --format cjs src/{cli,index}.js", | ||
| "build:self": "node dist/cli.js --target=node --format cjs src/{cli,index}.js", | ||
| "build:babel": "babel-node src/cli.js --target=node --format cjs src/{cli,index,babel-custom,microbundle-jest}.js", | ||
| "build:self": "node dist/cli.js --target=node --format cjs src/{cli,index,babel-custom,microbundle-jest}.js", |
therealparmesh
Jan 30, 2020
•
Author
I had to move babel-custom.js up a level from lib because lib is not created in dist. This works, but I could use some advice as to what is proper here. I’m think this may be related: #260 (comment)
| @@ -66,6 +66,7 @@ | |||
| "@rollup/plugin-node-resolve": "^6.1.0", | |||
| "asyncro": "^3.0.0", | |||
| "autoprefixer": "^9.7.3", | |||
| "babel-jest": "^24.8.0", | |||
therealparmesh
Jan 30, 2020
Author
I moved this to dependencies because it is a dependency of code that the package exports (microbundle-jest.js).
| }); | ||
| }; | ||
|
|
||
| export const config = (config, { customOptions }) => { |
therealparmesh
Jan 30, 2020
•
Author
I moved this file and touched a large number of lines, so GitHub will not diff this correctly. Most of the lines touched have to do this this change, where I lifted config and made it exportable.
| }, | ||
| preset.options, | ||
| { | ||
| modules: customOptions.jest ? 'auto' : false, |
therealparmesh
Jan 30, 2020
•
Author
I added the jest flag here. I was not sure if I should reuse the modern flag here.
| targets: customOptions.modern | ||
| ? ESMODULES_TARGET | ||
| : customOptions.targets, | ||
| modules: customOptions.jest ? 'auto' : false, |
|
@developit / @ForsakenHarmony: would love to see this land! |
This addresses #554.
NOTE: This needs feedback as it contains structural changes to the project.
Add something like this to your
package.json(or wherever your Jest configuration is):