yeoman / generator-generator

Generate a Yeoman generator
1.22k stars 238 forks source link

cant copy the file beginning with '.' #214

Open yeahzgit opened 6 years ago

yeahzgit commented 6 years ago

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

SBoudrias commented 6 years ago

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')
);