From cdf75bada6dc766f33531847e5c72b0efe324b82 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Fri, 4 May 2018 23:27:08 -0400 Subject: [PATCH] watch --- 9. ES6/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/9. ES6/README.md b/9. ES6/README.md index f2c8f20..568817a 100644 --- a/9. ES6/README.md +++ b/9. ES6/README.md @@ -125,6 +125,15 @@ var Car = function () { That's a spicy meatball! +If you want, you can adjust `package.json` to re-compile every time you make a change: + +``` +"scripts": { + "build": "babel --watch --presets es2015 test.js -o compiled.js" +}, +``` + + ## IIFE Normally, variable declarations, are "hoisted" up to the top of whatever function they are declared in (or global if no function exists). This can lead to some weird moments: