-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started work on adding "luke:grits"; it's a work in progress.
- Loading branch information
Luke Chavers
committed
Dec 22, 2016
1 parent
cdbb486
commit 0de692f
Showing
15 changed files
with
411 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Partial: "luke:travis-grits" ([source](../../generators/travis-grits/index.js)) | ||
|
||
A [partial](../partials.md) that generates a `.travis.yml` file with common | ||
options for Grits.js deployment.. | ||
|
||
## Usage Example | ||
|
||
``` | ||
$ yo luke:travis-grits | ||
``` | ||
|
||
## Files Created | ||
|
||
* `/.travis.yml` (static, [source](../../templates/grits/_travis.yml)) | ||
* `/scripts/grits/_vars.sh` (static, [source](../../templates/grits/scripts/grits/_vars.sh)) | ||
* `/scripts/grits/render/ci.sh` (static, [source](../../templates/grits/scripts/grits/render/_ci.sh)) | ||
|
||
|
||
## Other Operations | ||
|
||
* Adds a NPM run script: `scripts/grits/render/ci.sh` (as `grits-render-ci`) | ||
|
||
## Dependencies | ||
|
||
This [partial](../partials.md) depends on, and automatically includes: | ||
|
||
* [luke:grits-config](../partials/grits-config.md) | ||
* [luke:grits-scripts](../partials/grits-scripts.md) | ||
* [luke:package](../partials/package.md) | ||
* [luke:scripts](../partials/scripts.md) | ||
|
||
## Included In | ||
|
||
* [luke:app](../project-scaffolds/app.md) | ||
* [luke:grits](../project-scaffolds/grits.md) | ||
* [luke:module](../project-scaffolds/module.md) | ||
|
||
_Note: Additional, unlisted, [project scaffolds](../project-scaffolds.md) may | ||
automatically include this [partial](../partials.md) by way of | ||
[partial dependency](../partials.md#partial-dependency)._ | ||
|
||
# Further Reading | ||
|
||
* [Source](../../generators/travis-grits/index.js) - The source code for this [partial](../partials.md) | ||
* [Partial Listing](./) - Individual docs for each [partial](../partials.md) | ||
* [About Partials](../partials.md) - Information about partials | ||
* [About Project Scaffolds](../project-scaffolds.md) - Basic information about project scaffolds | ||
* [About Sub-Generators](../generators.md) - General information about generators and sub-generators | ||
* [Project README](../README.md) - Basic project information |
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,48 @@ | ||
# Project Scaffold: "luke:grits" ([source](../../generators/grits/index.js)) | ||
|
||
A [project scaffold](../project-scaffolds.md) that can be used to create or | ||
recreate a basic [Grits.js](https://github.com/Dasix/grits) project. | ||
|
||
This scaffold includes everything that the [module scaffold](module.md) includes | ||
as well as many additional [partials](../partials.md) for | ||
[Grits.js](https://github.com/Dasix/grits) development. | ||
|
||
## Usage Example | ||
|
||
``` | ||
$ yo luke:grits | ||
``` | ||
|
||
## Included Partials | ||
|
||
The following [partials](../partials.md) are included when this | ||
[project scaffold](../project-scaffolds.md) is used/specified: | ||
|
||
* [luke:editor](../partials/editor.md) | ||
* [luke:git](../partials/git.md) | ||
* [luke:js](../partials/js.md) | ||
* [luke:mit-license](../partials/mit-license.md) | ||
* [luke:mocha](../partials/mocha.md) | ||
* [luke:npm](../partials/npm.md) | ||
* [luke:package](../partials/package.md) | ||
* [luke:readme](../partials/readme.md) | ||
* [luke:scripts](../partials/scripts.md) | ||
* [luke:vagrant](../partials/vagrant.md) | ||
* [luke:bower](../partials/scripts.md) | ||
* [luke:grits-core](../partials/grits-core.md) | ||
* [luke:grits-config](../partials/grits-config.md) | ||
* [luke:grits-scripts](../partials/grits-scripts.md) | ||
* [luke:grits-source](../partials/grits-source.md) | ||
* [luke:travis-grits](../partials/travis-grits.md) | ||
|
||
_Note: Additional, unlisted, [partials](../partials.md) may be automatically | ||
included as [partial dependencies](../partials.md#partial-dependency)._ | ||
|
||
# Further Reading | ||
|
||
* [Source](../../generators/grits/index.js) - The source code for this [project scaffold](../project-scaffolds.md) | ||
* [Project Scaffold Listing](./) - Individual docs for each [project scaffold](../project-scaffolds.md) | ||
* [About Project Scaffolds](../project-scaffolds.md) - Basic information about project scaffolds | ||
* [About Partials](../partials.md) - Information about partials | ||
* [About Sub-Generators](../generators.md) - General information about generators and sub-generators | ||
* [Project README](../README.md) - Basic project information |
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,64 @@ | ||
/** | ||
* This is a "partial" sub-generator that sets up the basic npm run scripts | ||
* for Grits.js projects. | ||
* | ||
* @example | ||
* shell> yo luke:grits-scripts | ||
* | ||
* @author Luke Chavers <[email protected]> | ||
* @created 2016-12-22 | ||
*/ | ||
|
||
var yeoman = require( "yeoman-generator" ); | ||
var baseGenerator = require("../_BaseGenerator"); | ||
|
||
module.exports = baseGenerator.extend( | ||
{ | ||
prompting : function() { | ||
|
||
// Locals | ||
var me = this; | ||
|
||
// Initialize the base generator | ||
me._initBase(); | ||
|
||
me.composeWith("luke:pm2"); | ||
me.composeWith("luke:scripts"); | ||
|
||
}, | ||
|
||
default : { | ||
|
||
createSharedMetaObjects: function() { | ||
|
||
var me = this; | ||
|
||
// Add an npm script for running grits on travis | ||
me._createSharedObject( | ||
"script", "grits/xx/xx.sh", { | ||
name : "grits-xx", | ||
src : "grits/scripts/grits/render/_ci.sh", | ||
dest : "scripts/grits/render/ci.sh" | ||
} | ||
); | ||
|
||
} | ||
|
||
}, | ||
|
||
writing : { | ||
|
||
createPartialFiles : function() { | ||
|
||
var me = this; | ||
|
||
// _vars.sh | ||
me.fs.copy( | ||
me.templatePath( "grits/scripts/grits/_vars.sh" ), me.destinationPath( "scripts/grits/_vars.sh" ) | ||
); | ||
|
||
} | ||
} | ||
|
||
} | ||
); |
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,41 @@ | ||
/** | ||
* This is a "project scaffold" sub-generator that generates a project scaffold | ||
* for a Grits.js website. | ||
* | ||
* @example | ||
* shell> yo luke:grits | ||
* | ||
* @author Luke Chavers <[email protected]> | ||
* @created 2016-12-22 | ||
*/ | ||
|
||
var yeoman = require( "yeoman-generator" ); | ||
|
||
module.exports = yeoman.generators.Base.extend({ | ||
|
||
initializing : function() { | ||
|
||
// Locals | ||
var me = this; | ||
|
||
// Compose | ||
me.composeWith("luke:package"); | ||
me.composeWith("luke:mit-license"); | ||
me.composeWith("luke:readme"); | ||
me.composeWith("luke:js"); | ||
me.composeWith("luke:editor"); | ||
me.composeWith("luke:npm"); | ||
me.composeWith("luke:git"); | ||
me.composeWith("luke:vagrant"); | ||
me.composeWith("luke:mocha"); | ||
me.composeWith("luke:scripts"); | ||
me.composeWith("luke:bower"); | ||
me.composeWith("luke:travis-grits"); | ||
|
||
}, | ||
|
||
configuring: function() { | ||
this.log(" "); | ||
} | ||
|
||
}); |
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,57 @@ | ||
/** | ||
* This is a "partial" sub-generator that adds PM2 to the project. | ||
* | ||
* @example | ||
* shell> yo luke:pm2 | ||
* | ||
* @author Luke Chavers <[email protected]> | ||
* @created 2016-12-22 | ||
*/ | ||
|
||
var yeoman = require( "yeoman-generator" ); | ||
var baseGenerator = require("../_BaseGenerator"); | ||
|
||
module.exports = baseGenerator.extend( | ||
{ | ||
prompting : function() { | ||
|
||
// Locals | ||
var me = this; | ||
|
||
// Initialize the base generator | ||
me._initBase(); | ||
|
||
me.composeWith("luke:scripts"); | ||
|
||
}, | ||
|
||
configuring: { | ||
|
||
addProvisioningSteps: function() { | ||
|
||
var me = this; | ||
|
||
// Add provisioning steps to install PM2 & PM2 Web | ||
me._addVagrantStep("npm-install-pm2"); | ||
me._addVagrantStep("npm-install-pm2-web"); | ||
|
||
} | ||
|
||
}, | ||
|
||
writing : { | ||
|
||
createPartialFiles : function() { | ||
|
||
var me = this; | ||
|
||
// example-app.json | ||
me.fs.copy( | ||
me.templatePath( "core/env/pm2/_example-app.json" ), me.destinationPath( "env/pm2/example-app.json" ) | ||
); | ||
|
||
} | ||
} | ||
|
||
} | ||
); |
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,71 @@ | ||
/** | ||
* This is a "partial" sub-generator that generates a `.travis.yml` file | ||
* with common options for Grits.js deployment. | ||
* | ||
* @example | ||
* shell> yo luke:travis-grits | ||
* | ||
* @author Luke Chavers <[email protected]> | ||
* @created 2016-12-22 | ||
*/ | ||
|
||
var yeoman = require( "yeoman-generator" ); | ||
var baseGenerator = require("../_BaseGenerator"); | ||
|
||
module.exports = baseGenerator.extend( | ||
{ | ||
prompting : function() { | ||
|
||
// Locals | ||
var me = this; | ||
|
||
// Initialize the base generator | ||
me._initBase(); | ||
|
||
me.composeWith("luke:package"); | ||
me.composeWith("luke:grits-scripts"); | ||
//me.composeWith("luke:grits-config"); | ||
|
||
}, | ||
|
||
default : { | ||
|
||
createSharedMetaObjects: function() { | ||
|
||
var me = this; | ||
|
||
// Add an npm script for running grits on travis | ||
me._createSharedObject( | ||
"script", "grits/render/ci.sh", { | ||
name : "grits-render-ci", | ||
src : "grits/scripts/grits/render/_ci.sh", | ||
dest : "scripts/grits/render/ci.sh" | ||
} | ||
); | ||
|
||
} | ||
|
||
}, | ||
|
||
writing : { | ||
|
||
createPartialFiles : function() { | ||
|
||
var me = this; | ||
|
||
// _vars.sh | ||
// todo: move this to its own partial | ||
me.fs.copy( | ||
me.templatePath( "grits/scripts/grits/_vars.sh" ), me.destinationPath( "scripts/grits/_vars.sh" ) | ||
); | ||
|
||
// .travis.yml | ||
me.fs.copy( | ||
me.templatePath( "grits/_travis.yml" ), me.destinationPath( ".travis.yml" ) | ||
); | ||
|
||
} | ||
} | ||
|
||
} | ||
); |
Oops, something went wrong.