Luca Morelli February 2016

configure a different path per client deps in npm

In an asp.net core project all the client files must to be copied under the approot directory to be deployed correctly: jspm let you define a proper directory for client deps, but with npm I have to copy the files from node_modules directory to the approot\node_modules using a gulp task.
Since I'm not interested in filtering or manipulating the files before the deploy, but I just what that the files in the installed module are deployed, there is some way to do this without use gulp ?

Answers


MichaƂ Grzejszczak February 2016

You can use npm to do that. Add a script to your package.json:

  "scripts": {
      "copy": "xcopy from to"
  }

Then you can call npm run-script copy to have it executed. I used xcopy as an example, you can use whatever you like. There is some more documentation about scripts in npm.

Post Status

Asked in February 2016
Viewed 3,496 times
Voted 5
Answered 1 times

Search




Leave an answer