Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
fleeting committed Sep 23, 2016
0 parents commit ce951f8
Show file tree
Hide file tree
Showing 10 changed files with 268 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
coverage
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: node_js
node_js:
- v6
- v5
- v4
- '0.12'
- '0.10'
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Monkee-Boy <[email protected]> (https://www.monkee-boy.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
![Monkee-Boy](https://dujrsrsgsd3nh.cloudfront.net/img/emoticons/113009/mboy-1403710932.jpg) generator-mboy-deploy [![npm version](https://img.shields.io/npm/v/generator-mboy-gulp.svg?style=flat-square)](http://badge.fury.io/js/generator-mboy-gulp) [![Build Status](https://img.shields.io/travis/Monkee-Boy/generator-mboy-gulp.svg?style=flat-square)](https://travis-ci.org/Monkee-Boy/generator-mboy-deploy) [![Test Coverage](https://img.shields.io/coveralls/Monkee-Boy/generator-mboy-gulp.svg?style=flat-square)](https://coveralls.io/r/Monkee-Boy/generator-mboy-gulp)

> Generate the Monkee-Boy gulp setup.
## Installation

First, install [Yeoman](http://yeoman.io) and generator-mboy-gulp using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).

```bash
npm install -g yo
npm install -g generator-mboy-gulp
```

Then generate your new project:

```bash
yo mboy-gulp
```

## Getting To Know Yeoman

* Yeoman has a heart of gold.
* Yeoman is a person with feelings and opinions, but is very easy to work with.
* Yeoman can be too opinionated at times but is easily convinced not to be.
* Feel free to [learn more about Yeoman](http://yeoman.io/).

## Running Tests

```bash
npm test
```

## The Dev Team

Handcrafted with ♥ in Austin, Texas by the [Monkee-Boy Troop](http://www.monkee-boy.com/about/the-troop.php).

[![James Fleeting](https://avatars0.githubusercontent.com/u/23062?s=144)](https://github.com/fleeting) | [![Pete Gautier](https://avatars2.githubusercontent.com/u/5394199?v=3&s=144)](https://github.com/pgautier404) | [![John Hoover](https://avatars3.githubusercontent.com/u/48278?v=3&s=144)](https://github.com/defvayne23) | [![David Saunders](https://avatars3.githubusercontent.com/u/4614981?v=3&s=144)](https://github.com/djsaun)
:---:|:---:|:---:|:---:|:---:
[James Fleeting](https://github.com/fleeting) | [Pete Gautier](https://github.com/pgautier404) | [John Hoover](https://github.com/defvayne23) | [David Saunders](https://github.com/djsaun)

## License

MIT © [Monkee-Boy](https://www.monkee-boy.com)

![Monkee-Boy](http://assets.monkee-boy.com/mboy-logo-tagline.jpg)
58 changes: 58 additions & 0 deletions generators/app/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
'use strict';
var yeoman = require('yeoman-generator');
var chalk = require('chalk');
var yosay = require('yosay');
var string = require('underscore.string');

module.exports = yeoman.Base.extend({
prompting: function () {
this.log(['\n',
chalk.yellow(' ## ## ##### ## ## ## ## ####### ####### ##### ##### ## ##'),
chalk.yellow('### ### ####### ### ## ## ## ####### ####### ###### ####### ## ##'),
chalk.yellow('#### ### ## ## ### ## ## ## ## ## ## ## ## ## ## ##'),
chalk.yellow('#### #### ## ## #### ## #### ## ## ## ## ## ## ## ##'),
chalk.yellow('## #### ## ## ## ## ## ## #### ###### ###### #### ###### ## ## ####'),
chalk.yellow('## ## ## ## ## ## ## ## ##### ###### ###### #### ###### ## ## ##'),
chalk.yellow('## ## ## ## ## ## #### ## ### ## ## ## ## ## ## ##'),
chalk.yellow('## ## ## ## ## ### ## ## ## ## ## ## ## ## ##'),
chalk.yellow('## ## ####### ## ### ## ## ####### ####### ####### ####### ##'),
chalk.yellow('## ## ##### ## ## ## ### ####### ####### ###### ##### ##')].join('\n')
);

// Have Yeoman greet the user.
this.log(yosay(
'Welcome to the ' + chalk.green('MBoy Gulp') + ' v1.0 generator!'
));

this.log('I am going to generate the default Monkee-Boy gulp setup. Reference https://github.com/Monkee-Boy/gulpfile for more details.\n\nFirst a couple of quick questions.\n');

this.remote('Monkee-Boy', 'gulpfile', function (err, remote) {
remote.directory('.', '.');
});

var prompts = [
{
name: 'projectName',
message: 'What would you like to call this project (typically client name)?',
default: 'Project Name'
}, {
name: 'repoUrl',
message: 'What is the git repo url for this project?',
default: '[email protected]:monkeeboy/PROJECTREPONAME.git'
}
];

return this.prompt(prompts).then(function (props) {
this.props = props;
this.props.projectName = string.slugify(props.projectName);
}.bind(this));
},

writing: function () {
// this.template('package.json', 'package.json');
},

install: function () {
this.log('\nYour gulp files and structure are ready.\n' + chalk.green('May the code be with you.'));
}
});
52 changes: 52 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
'use strict';
var path = require('path');
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var excludeGitignore = require('gulp-exclude-gitignore');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var nsp = require('gulp-nsp');
var plumber = require('gulp-plumber');

gulp.task('static', function () {
return gulp.src('**/*.js')
.pipe(excludeGitignore())
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});

gulp.task('nsp', function (cb) {
nsp({package: path.resolve('package.json')}, cb);
});

gulp.task('pre-test', function () {
return gulp.src('generators/**/*.js')
.pipe(excludeGitignore())
.pipe(istanbul({
includeUntested: true
}))
.pipe(istanbul.hookRequire());
});

gulp.task('test', ['pre-test'], function (cb) {
var mochaErr;

gulp.src('test/**/*.js')
.pipe(plumber())
.pipe(mocha({reporter: 'spec'}))
.on('error', function (err) {
mochaErr = err;
})
.pipe(istanbul.writeReports())
.on('end', function () {
cb(mochaErr);
});
});

gulp.task('watch', function () {
gulp.watch(['generators/**/*.js', 'test/**'], ['test']);
});

gulp.task('prepublish', ['nsp']);
gulp.task('default', ['static', 'test']);
50 changes: 50 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "generator-mboy-gulp",
"version": "1.0.0",
"description": "Generate the Monkee-Boy gulp setup.",
"homepage": "https://github.com/Monkee-Boy/generator-mboy-gulp",
"author": {
"name": "James Fleeting",
"email": "[email protected]",
"url": "https://www.monkee-boy.com"
},
"files": [
"generators"
],
"main": "generators/index.js",
"keywords": [
"",
"yeoman-generator"
],
"dependencies": {
"yeoman-generator": "^0.23.0",
"chalk": "^1.0.0",
"yosay": "^1.0.0"
},
"devDependencies": {
"yeoman-test": "^1.0.0",
"yeoman-assert": "^2.0.0",
"eslint": "^3.1.1",
"eslint-config-xo-space": "^0.14.0",
"gulp": "^3.9.0",
"gulp-eslint": "^2.0.0",
"gulp-exclude-gitignore": "^1.0.0",
"gulp-line-ending-corrector": "^1.0.1",
"gulp-istanbul": "^1.0.0",
"gulp-mocha": "^2.0.0",
"gulp-plumber": "^1.0.0",
"gulp-nsp": "^2.1.0"
},
"eslintConfig": {
"extends": "xo-space",
"env": {
"mocha": true
}
},
"repository": "Monkee-Boy/generator-mboy-gulp",
"scripts": {
"prepublish": "gulp prepublish",
"test": "gulp"
},
"license": "MIT"
}
21 changes: 21 additions & 0 deletions test/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use strict';
var path = require('path');
var assert = require('yeoman-assert');
var helpers = require('yeoman-test');

var expected = [
'package.json',
'gulpfile.js'
];

describe('generator-mboy-gulp:app', function () {
before(function () {
return helpers.run(path.join(__dirname, '../generators/app'))
.withPrompts({someAnswer: true})
.toPromise();
});

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

0 comments on commit ce951f8

Please sign in to comment.