D:\node-slides>npm config list
; cli configs
user-agent = "npm/2.15.8 node/v4.4.7 win32 x64"
; userconfig C:\Users\sskoczyl\.npmrc
msvs_version = "2015"
proxy = "http://proxy.materna.de:8080/"
python = "python2.7"
; globalconfig C:\Users\sskoczyl\AppData\Roaming\npm\etc\npmrc
; builtin config undefined
prefix = "C:\\Users\\sskoczyl\\AppData\\Roaming\\npm"
; node bin location = C:\Program Files\nodejs\node.exe
; cwd = D:\node-slides
; HOME = C:\Users\sskoczyl
; 'npm config ls -l' to show all defaults.
npm config get prefix
C:\Users\sskoczyl\AppData\Roaming\npm
Better prefix! (add to PATH)Linux:
npm config set prefix $HOME/.node_modules_global
Windows:
npm config set prefix %userprofile%\node_modules_global
D:\node-slides>npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help json` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg> --save` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
name: (my-first-cool-project)
version: (1.0.0)
description: This is my first very cool project
entry point: (index.js)
test command: grunt nodeunit
git repository: https://git.myfirstcoolproject.com
keywords: cool
author: Me (me@myfirstcoolproject.com)
license: (ISC)
{
"name": "reveal.js",
"version": "3.3.0",
"description": "The HTML Presentation Framework",
"homepage": "http://lab.hakim.se/reveal-js",
"subdomain": "revealjs",
"main": "js/reveal.js",
"scripts": {
"test": "grunt test",
"start": "grunt serve"
},
"author": {
"name": "Hakim El Hattab",
"email": "hakim.elhattab@gmail.com",
"web": "http://hakim.se"
},
"repository": {
"type": "git",
"url": "git://github.com/hakimel/reveal.js.git"
},
"engines": {
"node": "~4.1.1"
},
"dependencies": {
"express": "~4.13.3",
"grunt-cli": "~0.1.13",
"mustache": "~2.2.1",
"socket.io": "~1.3.7"
},
"devDependencies": {
"grunt": "~0.4.5",
"grunt-autoprefixer": "~3.0.3",
"grunt-contrib-connect": "~0.11.2",
"grunt-contrib-cssmin": "~0.14.0",
"grunt-contrib-jshint": "~0.11.3",
"grunt-contrib-qunit": "~0.7.0",
"grunt-contrib-uglify": "~0.9.2",
"grunt-contrib-watch": "~0.6.1",
"grunt-sass": "~1.1.0-beta",
"grunt-zip": "~0.17.1",
"node-sass": "~3.3.3"
},
"license": "MIT"
}
npm install foobar --save --save-exact
npm config set save=true
npm config set save-exact=true
npm start