generator-generator icon indicating copy to clipboard operation
generator-generator copied to clipboard

cant copy the file beginning with '.'

Open yeahzgit opened this issue 8 years ago • 1 comments

writing() { this.fs.copy( this.templatePath('.'), this.destinationPath('') ); }

yeahzgit avatar Dec 25 '17 12:12 yeahzgit

Is your file named .? I don't think this will work because it's ambiguous as what the meaning is from the file system perspective (folder or file?)

If it's not the case, npm ignore some dotfiles by default, so make sure your dotfile is published with your project.

If you can't find the root cause, the easiest way is to replace the character and rename during copy operation:

this.fs.copy(
  this.templatePath('_gitignore'),
  this.destinationPath('.gitignore')
);

SBoudrias avatar Dec 26 '17 17:12 SBoudrias