This isn't on npm so to install...
npm install amindunited/node_file_mover
- Require this class
- Create a config
- Create a new instance of and pass the config to it
- Revel in the glory of your copied files!
"use strict";
// Step 1.
let Rearrange = require('rearrange');
// Step 2.
let config = {
matches: [
{
src: './src',
match: ['*.html'],
dest: './dist'
},
{
src: './src',
match: ['*.js'],
dest: './dist/scripts'
},
{
src: './src/css',
match: ['*.css'],
dest: './dist/styles'
}
]
};
// Step 3.
new Rearrange(config);