Skip to content

Commit

Permalink
Update project configuration using generator-node (woot!)
Browse files Browse the repository at this point in the history
  • Loading branch information
SBoudrias committed Jul 22, 2015
1 parent 1b47ffb commit 5f467ab
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 55 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules/
coverage/
node_modules
coverage
3 changes: 1 addition & 2 deletions .jscsrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"beforeOpeningCurlyBrace": true
},
"disallowMultipleVarDecl": true,
"requireSpacesInsideObjectBrackets": "allButNested",
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
"disallowSpaceAfterObjectKeys": true,
Expand All @@ -23,6 +22,6 @@
"disallowMultipleLineBreaks": true,
"disallowKeywordsOnNewLine": ["else"],
"requireLineFeedAtFileEnd": true,
"excludeFiles": ["node_modules/**", "bower_components/**"],
"excludeFiles": ["node_modules/**"],
"validateIndentation": 2
}
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
sudo: false
language: node_js
node_js:
- 'iojs'
- '0.12'
- '0.10'
env:
global:
- DEBUG="generators:*"
- '0.12'
- 'iojs'
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2015, Google
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
73 changes: 37 additions & 36 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
'use strict';
var path = require('path');
var gulp = require('gulp');
var excludeGitignore = require('gulp-exclude-gitignore');
var mocha = require('gulp-mocha');
var jshint = require('gulp-jshint');
var jscs = require('gulp-jscs');
var istanbul = require('gulp-istanbul');
var coveralls = require('gulp-coveralls');
var nsp = require('gulp-nsp');
var plumber = require('gulp-plumber');
var coveralls = require('gulp-coveralls');

var handleErr = function (err) {
console.log(err.message);
Expand All @@ -15,45 +17,43 @@ var handleErr = function (err) {

gulp.task('static', function () {
return gulp.src([
'test/*.js',
'lib/**/*.js',
'benchmark/**/*.js',
'index.js',
'doc.js',
'gulpfile.js'
])
.pipe(jshint('.jshintrc'))
.pipe(jshint.reporter('jshint-stylish'))
.pipe(jshint.reporter('fail'))
.pipe(jscs())
.on('error', handleErr);
'**/*.js',
'!test/fixtures/**'
])
.pipe(excludeGitignore())
.pipe(jshint('.jshintrc'))
.pipe(jshint.reporter('jshint-stylish'))
.pipe(jshint.reporter('fail'))
.pipe(jscs())
.on('error', handleErr);
});

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

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

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

gulp.src([
'lib/**/*.js',
'index.js'
])
.pipe(istanbul({
includeUntested: true
}))
.pipe(istanbul.hookRequire())
.on('finish', function () {
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.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('coveralls', ['test'], function () {
Expand All @@ -65,4 +65,5 @@ gulp.task('coveralls', ['test'], function () {
.pipe(coveralls());
});

gulp.task('prepublish', ['nsp']);
gulp.task('default', ['static', 'test', 'coveralls']);
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
"name": "yeoman-generator",
"version": "0.20.2",
"description": "Rails-inspired generator system that provides scaffolding for your apps",
"license": "BSD-2-Clause",
"homepage": "http://yeoman.io",
"repository": "yeoman/generator",
"author": "Yeoman team",
"files": [
"index.js",
"lib"
],
"main": "index.js",
"keywords": [
"development",
"dev",
Expand All @@ -16,21 +23,15 @@
"yeoman",
"app"
],
"homepage": "http://yeoman.io",
"author": "Yeoman",
"repository": "yeoman/generator",
"license": "BSD-2-Clause",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "gulp",
"doc": "jsdoc -c ./jsdoc.json ./readme.md",
"prepublish": "nsp audit-package"
"prepublish": "gulp prepublish"
},
"files": [
"index.js",
"lib"
],
"dependencies": {
"async": "^0.9.0",
"chalk": "^1.0.0",
Expand Down Expand Up @@ -75,10 +76,12 @@
"devDependencies": {
"gulp": "^3.6.0",
"gulp-coveralls": "^0.1.0",
"gulp-istanbul": "^0.9.0",
"gulp-exclude-gitignore": "^1.0.0",
"gulp-istanbul": "^0.8.1",
"gulp-jscs": "^1.1.0",
"gulp-jshint": "^1.5.3",
"gulp-mocha": "^2.0.0",
"gulp-nsp": "^0.4.5",
"gulp-plumber": "^1.0.0",
"jsdoc": "^3.3.0-beta1",
"jshint-stylish": "^1.0.0",
Expand Down

0 comments on commit 5f467ab

Please sign in to comment.