Skip to content

Commit

Permalink
Create a .gitkeep file in src/images/
Browse files Browse the repository at this point in the history
According to yeoman/yeoman#1668 the Right Way™ to do this is to create
an empty .gitkeep file, particularly because git doesn't track empty
directories.
  • Loading branch information
strugee committed May 7, 2017
1 parent 9c57d4b commit d7dfb2e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ var util = require('util');
var path = require('path');
var yeoman = require('yeoman-generator');
var yosay = require('yosay');
var mkdirp = require('mkdirp');

var StraticGenerator = yeoman.extend({
initializing () {
Expand Down Expand Up @@ -95,8 +94,7 @@ var StraticGenerator = yeoman.extend({
},

images () {
/* TODO: don't do sync I/O here */
mkdirp.sync(path.join(this.destinationRoot(), 'src/images/'));
this.fs.write(this.destinationPath('src/images/.gitkeep'), '');
},

blogTemplates () {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
],
"dependencies": {
"chalk": "^1.1.3",
"mkdirp": "^0.5.1",
"yeoman-assert": "^3.0.0",
"yeoman-generator": "^1.1.0",
"yosay": "^2.0.0"
Expand Down

0 comments on commit d7dfb2e

Please sign in to comment.