2. I have Node installed (7.7.3). I couldnβt tell you exactly when I installed it
I know Iβve used NPM (Node Package Manager) before
The default Foundation 6 build process requires Node
Node is built with JavaScript? Or *on* JavaScript? Or *is* JavaScript?
TL;DRβ¨
I donβt know enough
What do I know about Node?
3. βNode is a JavaScript runtime environment that achieves low latency and high
throughput by taking a βnon-blockingβ approach to serving requests.β
βNode is a platform built on Chrome's JavaScript runtime for easily building fast
and scalable network applications.β
Um, OK. The non-blocking thing sounds cool. Next!
Cheers. That kinda makes sense. Break it down for meβ¦
βNode is an open source server framework.
It allows you to run JavaScript on the server.β
Node in laymanβs terms
4. βIn short, NodeJs uses Googleβs V8 Javascript compiler engine to run JavaScript
through the command line. You can modify ο¬les on your system, create servers,
and do just about anything while writing only JavaScript.β
(Thank you Alexander Sage)
Node is JavaScript out of the browser
Node in laymanβs terms
6. Old news
This is nothing new.
Your ancient ancestors were using Node back in 2009.
7. Iβve always treated JavaScript as something that makes stuο¬ on a webpage fade in
and out or zip across the page. I was happy concentrating on the HTML/CSS.
But JavaScriptβs role in web development is changing.
The holy trinity of web dev
8. Write JavaScript using the Node.js libraries then use NPM to
distribute or share your code as a module.
JAVASCRIPT NODE.JS NODE PACKAGE MANAGER
> >
The Node process
9. +
Installing Node *also* installs a version of NPM.
They are made by the same company. They are not the same thing.
Node β€ NPM
10. The majority of my interactions with Node are via NPM.
Iβve been installing dependencies with NPM for a while and just getting on with it.
$ npm install
$ npm install -g
// This is a documented part of the
// set up process for the Content
// Publisher.
Node Package Manager (NPM)
12. βββ¬ through2@0.4.2
β βββ¬ readable-stream@1.0.34
β β βββ string_decoder@0.10.31
β βββ¬ xtend@2.1.2
β βββ object-keys@0.4.0
βββ¬ uglify-js@2.4.14
βββ async@0.2.10
βββ¬ optimist@0.3.7
β βββ wordwrap@0.0.2
βββ¬ source-map@0.1.34
β βββ amdefine@0.1.0
βββ uglify-to-browserify@1.0.2
Nine hundred or so lines laterβ¦
I have all of these modules installed globally. They are available to use in any project.
At least a few of them are familiar - Foundation, Fractal, Gulp, Grunt
Whatβs already there?
13. Modules can have their own dependencies.
Downloading a few modules could leave you with many, many sub-dependencies.
How do I know what to install?
// I know what I want to install
$ npm install <package name>
// OR ββββββββββββββββββ
// Check package.json and then install
// everything I need for this project
$ npm install
14. What do we use it for?
During set up, we install
Grunt via NPM. Grunt is a
JavaScript task runner we use
to compile our Sass into CSS.
The new UoB blog theme uses
a diο¬erent task runner called
Gulp to compile Sass and
JavaScript.
PUBLISHER APPS BLOGS.BATH
15. The combination of Node and NPM underpin a heck of a lot of
modern web development processes
Although just a small part of the Content Publisher toolset,β¨
Node plays a vital role in building Lens and Origins
I probably should think about pruning out the unused modulesβ¨
I have globally installed
I need to keep learning. Node is here to stay
So, what do I know about Node now?