davidchase / buba Goto Github PK
View Code? Open in Web Editor NEWBublé transform for your esnext tests + a little bit of Babel
License: MIT License
Bublé transform for your esnext tests + a little bit of Babel
License: MIT License
@davidchase In the readme, says to use babelrc to add options for babel. I'm running into an issue where im doing some server side rendering with React/Preact so I need jsx to be transformed.
I can get it to work using .babelrc, however, what do you think about allowing ability to pass babel options similar to bubleOptions ?
const bubleOptions ={jsx: 'h'}
const babelOptions = { "plugins": [["transform-react-jsx", { "pragma": "h" }]] }
require('buba/register')(bubleOptions, babelOptions)
const app = require('./app').default
// ... magic
Both rollup-plugin-buba
and buba
cli give me the following error:
Failed to transform file : /mnt/data/dev/@most/last/src/index.js Error: Options {"modules":false} passed to /mnt/data/dev/@most/last/node_modules/babel-preset-env/lib/index.js which does not accept options.
at /mnt/data/dev/@most/last/node_modules/buba/node_modules/babel-core/lib/transformation/file/options/option-manager.js:290:15
Here’s my .babelrc
:
{
"presets": [
["env", {
"modules": false
}],
"power-assert"
]
}
Updating babel-core
in ./node_modules/.bin/buba
seems to fix both rollup and cli.
For a bit more robustness and simplicity switching to commander should be nice
When transpiling tests, errors are simply logged, and do not cause the tests to fail which I think is the behavior that should occur.
The following travis build uses auto-deployment to NPM, even though one of the tests technically failed, it continued and did a release.
https://travis-ci.org/northbrookjs/northbrook/builds/155244446#L734
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.