Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Commit

Permalink
Small repo goodies
Browse files Browse the repository at this point in the history
  • Loading branch information
btd committed Aug 13, 2015
1 parent eb63707 commit fc3d799
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 27 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"eqeqeq": [2, "smart"],
"curly": 0,
"no-wrap-func": 0,
"no-underscore-dangle": 0
"no-underscore-dangle": 0,
"yoda": 0
},
"env": {
"node": true,
Expand Down
21 changes: 12 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
var gulp = require('gulp');
var $ = require('gulp-load-plugins')({lazy: false});

var source = require('vinyl-source-stream2');
var browserify = require('browserify');
var header = require('gulp-header');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');

var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');

var path = require('path');
var browserify = require('browserify');

var pkg = require('./package.json');

var banner = [
'/*',
'/*!',
' * <%= pkg.name %> - <%= pkg.description %>',
' * @version v<%= pkg.version %>',
' * @author <%= pkg.author %>',
Expand All @@ -31,10 +34,10 @@ gulp.task('script', function() {

return bundleStream
.pipe(source('should.js'))
.pipe($.header(banner, {pkg: pkg}))
.pipe(buffer())
.pipe(header(banner, {pkg: pkg}))
.pipe(gulp.dest('./'))
.pipe($.uglify())
.pipe($.header(banner, {pkg: pkg}))
.pipe($.rename('should.min.js'))
.pipe(uglify({ preserveComments: 'some' }))
.pipe(rename('should.min.js'))
.pipe(gulp.dest('./'));
});
2 changes: 1 addition & 1 deletion lib/ext/assert.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*!
/*
* Should
* Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
Expand Down
2 changes: 1 addition & 1 deletion lib/ext/bool.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*!
/*
* Should
* Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
Expand Down
2 changes: 1 addition & 1 deletion lib/ext/contain.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*!
/*
* Should
* Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
Expand Down
2 changes: 1 addition & 1 deletion lib/ext/eql.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*!
/*
* Should
* Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
Expand Down
2 changes: 1 addition & 1 deletion lib/ext/error.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*!
/*
* Should
* Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
Expand Down
6 changes: 3 additions & 3 deletions lib/ext/match.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*!
/*
* Should
* Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
Expand Down Expand Up @@ -75,7 +75,7 @@ module.exports = function(should, Assertion) {
if(matchedProps.length)
this.params.operator += '\n matched properties: ' + matchedProps.join(', ');

this.assert(notMatchedProps.length == 0);
this.assert(notMatchedProps.length === 0);
} // should we try to convert to String and exec?
} else if(typeof other == 'function') {
var res;
Expand Down Expand Up @@ -112,7 +112,7 @@ module.exports = function(should, Assertion) {
if(matchedProps.length)
this.params.operator += '\n matched properties: ' + matchedProps.join(', ');

this.assert(notMatchedProps.length == 0);
this.assert(notMatchedProps.length === 0);
} else {
this.assert(false);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/ext/number.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*!
/*
* Should
* Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
Expand Down
2 changes: 1 addition & 1 deletion lib/ext/property.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*!
/*
* Should
* Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
Expand Down
2 changes: 1 addition & 1 deletion lib/ext/string.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*!
/*
* Should
* Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
Expand Down
2 changes: 1 addition & 1 deletion lib/ext/type.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*!
/*
* Should
* Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
Expand Down
2 changes: 1 addition & 1 deletion lib/should.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*!
/*
* Should
* Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
Expand Down
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*!
/*
* Should
* Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
},
"devDependencies": {
"browserify": "latest",
"eslint": "latest",
"gulp": "^3.8.10",
"gulp-header": "^1.2.2",
"gulp-load-plugins": "^0.5.1",
"gulp-rename": "^1.2.0",
"gulp-uglify": "^1.0.1",
"gulp-util": "^2.2.14",
"mocha": "latest",
"mocha-better-spec-reporter": "latest",
"vinyl-source-stream2": "^0.1.1",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0",
"zuul": "latest"
},
"keywords": [
Expand Down

0 comments on commit fc3d799

Please sign in to comment.