如何使用其他节点项目中的node_modules目录

时间:2017-08-08 07:57:38

标签: angularjs node.js

我有一个想法。让我们说我正在学习角度,我创建了许多测试项目。使用命令ng new project_name。每次启动此命令都需要花费大量时间来下载和安装node_modules。我在想什么可以用ng new project_name --skip-install创建项目来创建项目并跳过节点模块安装,稍后在我的项目配置文件(systemjs.config.js)中引用

paths: {
      // paths serve as alias
      'npm:': 'node_modules/'  <-- here I change the path to some other directory
    },

使用已安装模块的其他先前项目中的node_modules目录。我试图实现的不是一次又一次地下载相同的模块,也不是为了减慢我的项目创建时间。

0 个答案:

没有答案