-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a subgenerator for Jekyll, updated the main app index.js file accordingly, added tests for Jekyll (currently not 100% complete), and updated tests and such for it. Everything should now work as it did before starting to split things up, at least the tests indicate so.
- Loading branch information
Showing
41 changed files
with
1,455 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
'use strict'; | ||
|
||
var _ = require('lodash'); | ||
var chalk = require('chalk'); | ||
var generators = require('yeoman-generator'); | ||
var path = require('path'); | ||
var yosay = require('yosay'); | ||
var shelljs = require('shelljs'); | ||
|
||
module.exports = generators.Base.extend({ | ||
constructor: function() { | ||
generators.Base.apply(this, arguments); | ||
|
||
var dependenciesInstalled = ['bundle', 'ruby'].every(function(depend) { | ||
return shelljs.which(depend); | ||
}); | ||
|
||
if (!dependenciesInstalled) { | ||
this.log('MISSING DEPENDENCIES:' + | ||
'\nEither ' + chalk.white('Ruby') + ' or ' + chalk.white('Bundler') + | ||
' is not installed or missing from $PATH.' + | ||
'\nMake sure that they are either installed or added to $PATH.'); | ||
shelljs.exit(1); | ||
} | ||
|
||
this.option('projectName', { | ||
type: String, | ||
required: true, | ||
desc: 'Project name' | ||
}); | ||
|
||
this.option('projectDescription', { | ||
type: String, | ||
required: true, | ||
desc: 'Project description' | ||
}); | ||
|
||
this.option('projectURL', { | ||
type: String, | ||
required: true, | ||
desc: 'Project URL' | ||
}); | ||
|
||
this.option('authorName', { | ||
type: String, | ||
required: true, | ||
desc: 'Author name' | ||
}); | ||
|
||
this.option('authorEmail', { | ||
type: String, | ||
required: true, | ||
desc: 'Author email' | ||
}); | ||
|
||
this.option('authorBio', { | ||
type: String, | ||
required: true, | ||
desc: 'Author bio' | ||
}); | ||
|
||
this.option('authorTwitter', { | ||
type: String, | ||
required: true, | ||
desc: 'Author twitter' | ||
}); | ||
|
||
this.option('jekyllPermalink', { | ||
type: String, | ||
required: true, | ||
desc: 'Jekyll permalinks' | ||
}); | ||
|
||
this.option('jekyllPaginate', { | ||
type: String, | ||
required: true, | ||
desc: 'Jekyll paginate' | ||
}); | ||
}, | ||
|
||
writing: function() { | ||
this.fs.copy( | ||
this.templatePath('Gemfile'), | ||
this.destinationPath('Gemfile') | ||
); | ||
|
||
this.fs.copyTpl( | ||
this.templatePath('config.yml'), | ||
this.destinationPath('_config.yml'), | ||
{ | ||
projectName: this.options.projectName, | ||
projectDescription: this.options.projectDescription, | ||
projectURL: this.options.projectURL, | ||
authorName: this.options.authorName, | ||
authorEmail: this.options.authorEmail, | ||
authorBio: this.options.authorBio, | ||
authorTwitter: this.options.authorTwitter, | ||
jekyllPermalinks: this.options.jekyllPermalinks, | ||
jekyllPaginate: this.options.jekyllPaginate | ||
} | ||
); | ||
|
||
this.fs.copyTpl( | ||
this.templatePath('config.build.yml'), | ||
this.destinationPath('_config.build.yml') | ||
); | ||
|
||
this.fs.copy( | ||
this.templatePath('app'), | ||
this.destinationPath('src') | ||
); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
source "http://rubygems.org" | ||
|
||
gem 'jekyll' | ||
gem 'redcarpet' | ||
|
||
# jekyll plugins | ||
gem 'jekyll-archives', :git => 'https://github.com/jekyll/jekyll-archives' | ||
gem 'jekyll-sitemap' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
layout: default | ||
title: "404: Page not found" | ||
--- | ||
|
||
<div class="page"> | ||
<h1 class="page-title">404: Page not found</h1> | ||
<p class="lead">Sorry, we've misplaced that URL or it's pointing to something | ||
that doesn't exist. <a href="/">Head back home</a> to try finding it | ||
again.</p> | ||
</div> |
Oops, something went wrong.