A
A
Aleksey Pleshkov2016-07-31 20:47:16
npm
Aleksey Pleshkov, 2016-07-31 20:47:16

How to install dependencies from package.json globally?

Good day.
Mastering Foundation 6. Deployed the project according to the instructions . As a result, the project turns out to be almost 700mb.
Is it possible to use dependencies from node_modules globally? Or take it to a separate directory, and in the project indicate the address where to look for them.
Thank you.
package.json Foundation.

{
  "name": "foundation-zurb-template",
  "version": "1.0.0",
  "description": "Official ZURB Template for Foundation for Sites.",
  "main": "gulpfile.js",
  "scripts": {
    "start": "gulp",
    "build": "gulp build --production"
  },
  "author": "ZURB <[email protected]>",
  "license": "MIT",
  "devDependencies": {
    "babel-preset-es2015": "^6.3.13",
    "babel-register": "^6.7.2",
    "browser-sync": "^2.10.0",
    "gulp": "gulpjs/gulp#4.0",
    "gulp-autoprefixer": "^3.1.0",
    "gulp-babel": "^6.1.2",
    "gulp-cli": "^1.2.1",
    "gulp-concat": "^2.5.2",
    "gulp-cssnano": "^2.1.0",
    "gulp-extname": "^0.2.0",
    "gulp-if": "^2.0.0",
    "gulp-imagemin": "^2.2.1",
    "gulp-load-plugins": "^1.1.0",
    "gulp-sass": "^2.1.0",
    "gulp-sourcemaps": "^1.6.0",
    "gulp-uglify": "^1.2.0",
    "gulp-uncss": "^1.0.1",
    "js-yaml": "^3.4.6",
    "panini": "^1.3.0",
    "rimraf": "^2.4.3",
    "style-sherpa": "^1.0.0",
    "yargs": "^3.8.0"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/zurb/foundation-zurb-template.git"
  },
  "bugs": {
    "url": "https://github.com/zurb/foundation-sites/issues",
    "email": "[email protected]"
  },
  "babel": {
    "presets": ["es2015"]
  },
  "private": true
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
napa3um, 2016-08-01
@AlekseyPleshkov

Of the options, apparently, only the use of operating / file system tools to make local node_modules directories links to one global one (Linux - ln, Windows - mklink).

S
sergey, 2016-07-31
@zorro76

Using npm to Install Applications Globally

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question