Jamez Fatout
Jamez Fatout

Reputation: 392

How use copyfiles from electron

I don't know how I can use the copyfiles function.
I want to copy a whole "dist" file (with subfiles) in a "electron" file like

copyfiles dist electron

The "dist" is the sourcefile and "electron" is the targetFile.
How can I do that?

Upvotes: 3

Views: 482

Answers (1)

udalmik
udalmik

Reputation: 7988

I am not sure if understood your question. If you just need to copy some assets/resources during your NPM build, then you can use one of existing npm modules, e.g. copyfiles

So you need to install it as dev dependency

npm i copyfiles --save-dev

And add corresponding task to your package.json scripts:

"scripts": {
  "copy-assets": "copyfiles dist/* electron"
}

Upvotes: 1

Related Questions