Skip to content

Commit

Permalink
Lfa new now adds .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
dapetcu21 committed Apr 17, 2015
1 parent f8412dc commit 041fce9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/commands/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var _ = require('lodash');
var es = require('event-stream');
var through = require('through2');
var File = require('vinyl');
var fs = require('fs');

function capitalizeFirstLetters(s) {
s = s.replace(/-/g, ' ');
Expand Down Expand Up @@ -72,6 +73,7 @@ module.exports = function newProject(cli) {
var skelPath = path.resolve(__dirname, '..', '..', 'skel');
var sourceStream = pipeErrors(vfs.src(path.join(skelPath, '**', '*')));
var packageStream = pipeErrors(through.obj());
var gitignoreStream = pipeErrors(vfs.src(path.join(skelPath, '.gitignore')));
var destinationStream = vfs.dest(projPath);

process.nextTick(function () {
Expand All @@ -98,7 +100,7 @@ module.exports = function newProject(cli) {
packageStream.end();
});

es.merge(sourceStream, packageStream)
es.merge(sourceStream, gitignoreStream, packageStream)
.pipe(destinationStream);

return when.promise(function (resolve, reject) {
Expand Down
18 changes: 18 additions & 0 deletions skel/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# LFA build output
/.lfa/build

# Editor swap files
*~
*.sw*
.backup-*

# Desktop files
.DS_Store
Thumbs.db
ehthumbs.db
Desktop.ini

# NPM
node_modules
npm-debug.log

0 comments on commit 041fce9

Please sign in to comment.