arloliu / copy-node-modules

Fast deploy Node.js modules from local source folder to distination folder
26 stars 14 forks source link

Add opts for specify location of node_modules #7

Closed DrSensor closed 6 years ago

DrSensor commented 6 years ago

I have a case when I need to specify the directory of node_modules because using https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/ . I have separate client and server folder with separate package.json and I notice this package don't have an option to specifying the directory of src node_modules.

This is what I want to achieve.

copyNodeModule(path.resolve(__dirname, '../server'), config.build.assetsRoot, {
      srcDir: __dirname,
      devDependencies: false
    }, (err, results) => {