Skip to content

Commit

Permalink
Added git submodule and minor formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sondr3 committed Apr 29, 2015
1 parent 70eb510 commit 729ec19
Show file tree
Hide file tree
Showing 9 changed files with 118 additions and 10 deletions.
4 changes: 4 additions & 0 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ module.exports = generators.Base.extend({
this.composeWith('jekyllized:jscs', {}, {
local: require.resolve('../jscs')
});

this.composeWith('jekyllized:git', {}, {
local: require.resolve('../git')
});
}
});
17 changes: 17 additions & 0 deletions generators/git/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use strict';

var generators = require('yeoman-generator');

module.exports = generators.Base.extend({
initializing: function() {
this.fs.copy(
this.templatePath('gitignore'),
this.destinationPath('.gitignore')
);

this.fs.copy(
this.templatePath('gitattributes'),
this.destinationPath('.gitattributes')
);
}
});
1 change: 1 addition & 0 deletions generators/git/templates/gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
70 changes: 70 additions & 0 deletions generators/git/templates/gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# .gitignore for jekyllized projects

# Ignore hidden folders
# This takes care of .tmp, .sass-cache, and many others
.*/

# OSX
._*
.AppleDouble
.DS_Store
.localized
.LSOverride
.Spotlight-V100
.Trashes
Icon

# Windows
Desktop.ini
ehthumbs.db
Thumbs.db

# Linux
*~

# Tags
# Ignore tags created by etags and ctags
TAGS
tags

# Always-ignore files and folders #
*.diff
*.err
*.log
*.orig
*.rej
*.swn
*.swo
*.swp
._*
*~

# Ignore packages #
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Packages
node_modules/*
.tmp
test/

# Sublime
*.sublime-project
*.sublime-workspace
*.sublime-projectcompletions

app/_bower_components

# Output folders
serve
site

# hide the AWS and Rsync credentials file
aws-credentials.json
rsync-credentials.json
4 changes: 3 additions & 1 deletion test/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ describe('jekyllized:app', function() {
assert.file([
'.editorconfig',
'.jshintrc',
'.jscsrc'
'.jscsrc',
'.gitignore',
'.gitattributes'
]);
});
});
4 changes: 1 addition & 3 deletions test/editorconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ describe('jekyllized:editorconfig', function() {
});

it('created .editorconfig', function() {
assert.file([
'.editorconfig'
]);
assert.file('.editorconfig');
});
});
20 changes: 20 additions & 0 deletions test/git.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
'use strict';

var path = require('path');
var assert = require('yeoman-assert');
var helpers = require('yeoman-generator').test;

describe('jekyllized:git', function() {
before(function(done) {
helpers.run(path.join(__dirname, '../generators/git'))
.on('end', done);
});

it('creates .gitignore', function() {
assert.file('.gitignore');
});

it('creates .gitattributes', function() {
assert.file('.gitattributes');
});
});
4 changes: 1 addition & 3 deletions test/jscs.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ describe('jekyllized:jscs', function() {
});

it('creates .jscsrc', function() {
assert.file([
'.jscsrc'
]);
assert.file('.jscsrc');
});
});
4 changes: 1 addition & 3 deletions test/jshint.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ describe('jekyllized:jshint', function() {
});

it('creates .jshintrc', function() {
assert.file([
'.jshintrc'
]);
assert.file('.jshintrc');
});
});

0 comments on commit 729ec19

Please sign in to comment.