Closed rakistner closed 7 years ago
Thank you very much for your PR! Have you had a chance to test this already? I'll merge today if everything is OK.
I updated config.js
to resolve the package.json file as recommended. Needed to update compile.js
function to include plugins. This worked locally through a yarn add
installation, but did not work through the global cli installation, so I was able to resolve this by also updating the installDeps.js
function. This worked with compiling React, Marko, and plain JSX so far.
Great, thank you! I've rebased so I can squash & merge, just let me test this change on a few projects today.
In a future, we'll need to cleanup the whole babel configuration logic.
Hi @rakistner, I've pushed some changes, primarily cleanups and refactors of the old code. Now the babel-specific part is (almost) in a single file https://github.com/rakistner/dawson-cli/blob/master/src/libs/language-javascript-latest/_babelHelpers.js and should be more clear to read.
If you can test the updated code on your codebase too, then I'll merge and release!
Thank you very much for your help so far!
Beautiful! Ran it through a bunch of babel configs, and everything worked great. The warning is great, and it outputs nice verbose babel errors when the config fails which are easy to trace and change with the babel config. I love it.
Great! Thank you very much for your time. I'll merge now and publish to npm tomorrow (GMT), laptop is broken and have to use office's PC :(
The
validateBabelRc()
function on line 237 insrc/config.js
throws an error when there's a.babelrc
file in the project root directory, and asks for ababel: {}
property in the package.json file instead, however nothing was done with that property, and a babel override would be nice to extend the base config to include other presets and plugins for syntax support, transforms, react, etc..