Small fixes to path problems on windows.

master
Zed A. Shaw 2 years ago
parent 99c787ce92
commit 30969b5e22
  1. 1
      bando.ps1
  2. 8
      commands/create.js

@ -0,0 +1 @@
node ./bando.js $args

@ -33,9 +33,11 @@ export const main = async (target, opts) => {
// copy all of the template files to the destination
for(let f of temp_files) {
// kind of dumb way to trim the middle of the path out
const copy_to = f.replace(`${temp_dir}/`, '');
const f_normal = path.join(f, ''); // this fixes glob's using / on windows
// use simple string replace to remove the template part
const copy_to = f_normal.replace(`${temp_dir}`, '').replace('\\\\', '\\');
mkdir_to(copy_to);
copy(f, copy_to); // we can add a template thing here
log.debug(`${f} ---> ${copy_to}`);
copy(f_normal, copy_to); // we can add a template thing here
log.debug(`${f_normal} ---> ${copy_to}`);
}
}

Loading…
Cancel
Save