slushjs / slush

The streaming scaffolding system - Gulp as a replacement for Yeoman
http://slushjs.github.io/generators
MIT License
1.24k stars 58 forks source link

Dotfiles being ignored? #48

Closed john-goldsmith closed 8 years ago

john-goldsmith commented 8 years ago

It'd be great if dotfiles could be produced by generators. This would be helpful for generating files such as .gitignore, .jshintrc, .drone.yml, etc. Thanks!

joakimbeng commented 8 years ago

A generator can already produce dotfiles in two ways:

  1. Use the dot option for gulp.src:
// copy all files (including dotfiles from /generator-path/templates to current working directory:
gulp.src('./templates/**', {cwd: __dirname, dot: true})
  .pipe(gulp.dest('./'));
  1. Use gulp.src in combination with gulp-rename, see e.g. slush-angular's slushfile