Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NPM Install -- copying Files to other folder

Tags:

node.js

npm

It's possible to install a node module in which, It's copy file other folder, like etc.

I mean my app has

app.js
conf/config.json

npm install app -g 

conf/config.json--> /etc/app/config.json
like image 918
Agus Avatar asked Jan 25 '26 09:01

Agus


1 Answers

If you have non trivial tasks to implement, you can benefit from a task framework like Grunt or Gulp. These are used mostly to automate builds which is basically a non trivial set of file operations.

For simple, one off copies the copyfiles module could be your best friend.

like image 69
vizmi Avatar answered Jan 28 '26 08:01

vizmi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!