Closed wwwtyro closed 7 years ago
Ok, I think I'll treat it as a major release of budo since browserify@14 is dropping support for old IE in the Buffer module (a breaking change). I plan on making a major bump of budo anyways for the LiveReload integration, which is pretty much complete except for some documentation.
For now you can take advantage of the latest browserify (as well as new LiveReload backend) via:
npm i mattdesl/budo#feature/livereload-rework --save-dev
Hm, that command does seem to install browserify 14.1
, but I'm still getting Unexpected token while parsing file
on the line that has async
on it. Is there some other parser that budo uses? Or have I just not had enough coffee yet?
Edit: Perhaps it's that thing that pretty-prints errors in the browser, pointing to the exact code.
It seems to work fine for me. Maybe check the following:
budo --version
to see). Depending on whether you're using budo index.js
from shell or package.json
script you might get a global vs local install.brfs
.Here's the code I'm testing:
function resolveAfter2Seconds(x) {
return new Promise(resolve => {
setTimeout(() => {
resolve(x);
}, 2000);
});
}
async function add1(x) {
var a = resolveAfter2Seconds(20);
var b = resolveAfter2Seconds(30);
return x + await a + await b;
}
add1(10).then(v => {
console.log(v); // prints 60 after 2 seconds.
});
And the command I'm using:
budo index.js -o
Thanks - I disabled sheetify and it compiled, so I'll investigate sheetify
Going to close this for now since it no longer seems related to budo. Feel free to open a new issue if there's anything else. :smile:
Just to clarify, it looks like budo now uses browserify 14.1
per package.json. Thanks!
Would love to pull this in: https://github.com/substack/node-browserify/issues/1667
(sorry, wrong link previously)