Skip to content

Commit

Permalink
Merge bb8b86e into fb27dde
Browse files Browse the repository at this point in the history
  • Loading branch information
drkibitz committed Jan 26, 2014
2 parents fb27dde + bb8b86e commit 02999ea
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 83 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Expand Up @@ -6,16 +6,16 @@ env:
global:
- secure: CetX10W3SCeTfvyM4c4GutdprDsRWdBgwc1Iw0eFW63Uphep1JYNhqy5oLRkGX7keBCJGmERr32Z5R0N+FWAyzP80qt1Cn4aoxaKvYsFbmW8Mmo5DaPKA0yH4NnnuQLd0kCObgh1ptaG/PMc4HxvgU1T5zkUdd3lwxUZcqd6jPA=
install:
- npm install grunt-cli istanbul coveralls
- npm install istanbul coveralls
- npm install
cache:
directories:
- node_modules
script:
- ./node_modules/.bin/grunt jshint
- ./node_modules/.bin/istanbul cover ./node_modules/.bin/grunt mochaTest:source
- ./node_modules/.bin/gulp jshint
- ./node_modules/.bin/istanbul cover ./node_modules/.bin/gulp test-source
- cat ./build/coverage/lcov.info | ./node_modules/.bin/coveralls
- ./node_modules/.bin/grunt uglify mochaTest:dist
- ./node_modules/.bin/gulp test-dist
deploy:
api_key:
secure: iX4IdMDpceD95iXwmboCh94uDam3R3LtYga9zMqtZYcFq+0pCpBxr2AIF2xLltK1i2iOh01Du0Jmkjc1M/j1S1/ZlzqtLXHjrMPAXjjblzkAAZFVyrwfczAh3e5apo6O1ytEUTydyphhvBHMJKv4BkVMd747PZYQNKrhDgy1i6Y=
Expand Down
71 changes: 0 additions & 71 deletions Gruntfile.js

This file was deleted.

59 changes: 59 additions & 0 deletions gulpfile.js
@@ -0,0 +1,59 @@
/*jshint node:true*/
'use strict';

var gulp = require('gulp'),
jshint = require('gulp-jshint'),
map = require('map-stream'),
mocha = require('gulp-mocha'),
uglify = require('gulp-uglify'),
pkg = require('./package.json'),
banner = [
'/**',
' * ' + pkg.name + ' ' + pkg.version,
' * ' + pkg.homepage,
' * Copyright (c) 2013 Dr. Kibitz, http://drkibitz.com',
' * ' + pkg.description,
' * built: ' + new Date(),
' */',
''
].join('\n');

gulp.task('jshint', function () {
return gulp.src(['gulpfile.js', 'src/**/*.js', 'test/**/*.js'])
.pipe(jshint('.jshintrc'))
.pipe(jshint.reporter('default'));
});

gulp.task('uglify', function () {
return gulp.src('src/index.js')
.pipe(map(function (file, cb) {
file.contents = Buffer.concat([
new Buffer('(function(module,exports){'),
file.contents,
new Buffer('}(module,exports));')
]);
cb(null, file);
}))
.pipe(uglify({wrap: 'nodes'}))
.pipe(map(function (file, cb) {
file.contents = Buffer.concat([new Buffer(banner), file.contents]);
cb(null, file);
}))
.pipe(gulp.dest('./'));
});

function testTask(requireModule) {
return function () {
return gulp.src('test/unit/**/*.js', {read: false})
.pipe(mocha({
reporter: 'spec',
globals: {
nodes: require(requireModule)
}
}));
};
}
gulp.task('test-source', testTask('./test/source'));
gulp.task('test-dist', ['uglify'], testTask('./test/dist'));

gulp.task('default', ['jshint', 'test-dist']);
4 changes: 2 additions & 2 deletions index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions package.json
Expand Up @@ -2,11 +2,13 @@
"author": "Dr. Kibitz <info@drkibitz.com>",
"bugs": "https://github.com/drkibitz/qi-nodes/issues",
"devDependencies": {
"grunt": "0.4.x",
"grunt-contrib-jshint": "0.8.x",
"grunt-contrib-uglify": "0.2.x",
"grunt-jsdoc": "0.5.x",
"grunt-mocha-test": "0.8.x"
"gulp": "~3.5.0",
"gulp-jshint": "~1.3.4",
"gulp-mocha": "~0.4.1",
"gulp-uglify": "~0.2.0",
"gulp-util": "*",
"map-stream": "~0.1.0",
"mocha": "*"
},
"description": "Base implementation for composite patterns in JavaScript.",
"files": [
Expand All @@ -26,7 +28,7 @@
"name": "qi-nodes",
"repository": "https://github.com/drkibitz/qi-nodes",
"scripts": {
"test": "grunt test"
"test": "./node_modules/.bin/gulp test"
},
"version": "0.0.3"
}

0 comments on commit 02999ea

Please sign in to comment.