Modern JavaScript

From Jon's Wiki
Revision as of 01:39, 20 June 2016 by Johnno (talk | contribs) (Created page with "== Package managers == Why do we need a package manager? Atomicity, repeatability, compartmentalisation. There are a options: npm, bower; but they're often conflated into apt...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Package managers

Why do we need a package manager? Atomicity, repeatability, compartmentalisation. There are a options: npm, bower; but they're often conflated into apt-get, composer (PHP projects), pip, gems. Bower devs are planning to EOL it and replac it with npm.

mkdir new-project
cd new-project
npm init
npm install left-pad
ls
ls node_modules
npm install left-pad --save  # adds deps to package.json
rm node_modules -rf
npm install  # installs dependencies locally.

ES6

ECMAScript 6. ECMA = European Computer Manufacturers' Association. Microsoft used ECMA to rubber-stamp their "standards", since ISO and IETF actually required some standardisation and collaboration effort.

History

September 1995: Mocha/LiveScript/JavaScript June 1997: ECMA Script 1 June 1998: ECMA Script 2 Dec 1999: ECMA Script 3 October 2008: Microsoft not interested in advancing ECMA Script, due to Silverlight. v4 fail Dec 09: ECMA Script 5: Microsoft finally gives up. map, filter, reduce. Browsers today (Q2 2016) June 15: ECMA Script 6: not implemented yet. Can get there using babeljs