Skip to content

Instantly share code, notes, and snippets.

@OlivierParent
Created November 17, 2014 17:47
Show Gist options
  • Save OlivierParent/3a9b0a1ebfbcde08f3ae to your computer and use it in GitHub Desktop.
Save OlivierParent/3a9b0a1ebfbcde08f3ae to your computer and use it in GitHub Desktop.
Node.md

NMDAD III - Node.js

[TOC]

I. Inleiding

Node.js, of kortweg Node, wordt gebruikt om heel wat CLI-tools te bouwen met JavaScript.

II. Installatie

1. Linux

2. Mac OS X

2.1 Installeren via Homebrew

Installeer Homebrew met:

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Installeer daarna Node:

$ brew install node
$ node -v
$ npm -v

OPGELET: Update met onderstaande opdracht!

$ npm install -g npm@latest

2.2 Verwijderen

Referentie: http://stackoverflow.com/questions/14673327/removing-node-js-from-mountain-lion

$ brew uninstall node
$ sudo rm -rf /usr/local/bin/node*
$ sudo rm -rf /usr/local/lib/node*
$ sudo rm -rf /usr/local/include/node*
$ rm -rf ~/.node*
$ rm -rf ~/.npm
$ rm /usr/local/share/man/man1/node.1

3. Windows

III. Gebruik

NPM (Node Package Manager) gebruik je om Node Packages te beheren.

Een package te installeren voor heel het systeem (-g: global):

$ npm install -g <package>

Verwijderen:

$ npm uninstall -g <package>

1. Node Packages

1.1 Bower

Bower is een package manager voor het web.

$ npm install -g bower
$ bower -v

1.2 Cordova

Apache Cordova is de opensource versie van Adobe PhoneGap, een platform om Native Mobile Applications te bouwen.

$ npm install -g cordova    
$ cordova -v

1.3 Grunt

Grunt is een JavaScript Task Runner.

$ npm install -g gulp-cli
$ gulp --version

1.4 Gulp

Gulp is een JavaScript Task Runner vergelijkbaar met Grunt, maar eenvoudiger.

$ npm install -g gulp
$ gulp -v

1.5 Ionic

Ionic is een framework om Hybrid Mobile Apps te maken. Het is gebaseerd op AngularJS van Google en Apache Cordova.

$ npm install -g ionic
$ ionic -v

1.6 PhoneGap

Adobe PhoneGap Gebaseerd op Apache Cordova.

$ npm install -g phonegap 
$ phonegap -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment