Go, Mental Models, and Side Effects


Go, Mental Models, and Side Effects
http://ift.tt/2stbQt4

Submitted June 14, 2017 at 08:38PM by mlafeldt
via reddit http://ift.tt/2t2kHyY

Advertisements

How do I polyfill ES6 javascript files client-side?


How do I polyfill ES6 javascript files client-side?

I'm creating a small application in Node.js and want to polyfill all of the ES6 features I have been using in my code so that the app works when viewed with webkit/etc… I want to use Babel, but it looks like it is set up mostly for server-side JS. How do I pre-compile ES6 JS down to ES5 and serve it up to the client?

My current tree of javascript code:

js ├── components │   ├── api │   │   └── api.js │   ├── list │   │   └── list.js │   ├── loader │   │   └── loader.js │   └── scanResults │   └── scanResults.js ├── external │   └── jquery.min.js └── scanner ├── app.js └── main.js 

Submitted June 14, 2017 at 11:34PM by spel3o
via reddit http://ift.tt/2sAGD72