Skip to content

Commit 7025313

Browse files
committed
Sync versions (resolves #5)
1 parent 1e8fa55 commit 7025313

File tree

7 files changed

+38
-16
lines changed

7 files changed

+38
-16
lines changed

.npmignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
src/
2+
test/
3+
images/
4+
docs/
5+
.jshintrc
6+
.travis.yml
7+
jsdoc.json

Gulpfile.js

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
'use strict';
22

3+
var fs = require('fs');
4+
var pkg = JSON.parse( fs.readFileSync('./package.json') );
35
var gulp = require('gulp');
46
var sourcemaps = require('gulp-sourcemaps');
57
var plugins = require('gulp-load-plugins')();
68
var gutil = require('gulp-util');
79
var shell = require('gulp-shell');
810
var size = require('gulp-check-filesize');
911
var jshint = require('gulp-jshint');
12+
var rename = require('gulp-rename');
13+
var insert = require('gulp-insert');
1014

1115
var build = {
1216
filename: 'rekord-debug.js',
@@ -17,14 +21,19 @@ var build = {
1721
]
1822
};
1923

24+
var comments = [
25+
"/*", pkg.name, pkg.version, '-', pkg.description, 'by', pkg.author, "*/\n"
26+
];
27+
2028
var executeMinifiedBuild = function(props)
2129
{
2230
return function() {
2331
return gulp
24-
.src( props.include )
32+
.src( props.output + props.filename )
33+
.pipe( rename( props.minified ) )
2534
.pipe( sourcemaps.init() )
26-
.pipe( plugins.concat( props.minified ) )
2735
.pipe( plugins.uglify().on('error', gutil.log) )
36+
.pipe( insert.prepend( comments.join(' ') ) )
2837
.pipe( sourcemaps.write('.') )
2938
.pipe( size({enableGzip: true}) )
3039
.pipe( gulp.dest( props.output ) )
@@ -38,24 +47,26 @@ var executeBuild = function(props)
3847
return gulp
3948
.src( props.include )
4049
.pipe( plugins.concat( props.filename ) )
50+
.pipe( insert.prepend( comments.join(' ') ) )
4151
.pipe( size({enableGzip: true}) )
4252
.pipe( gulp.dest( props.output ) )
43-
.pipe(jshint())
44-
.pipe(jshint.reporter('default'))
45-
.pipe(jshint.reporter('fail'))
53+
.pipe( jshint() )
54+
.pipe( jshint.reporter('default') )
55+
.pipe( jshint.reporter('fail') )
4656
;
4757
};
4858
};
4959

5060
gulp.task('lint', function() {
5161
return gulp
52-
.src(build.output + build.filename)
53-
.pipe(jshint())
54-
.pipe(jshint.reporter('default'))
55-
.pipe(jshint.reporter('fail'))
62+
.src( build.output + build.filename )
63+
.pipe( jshint() )
64+
.pipe( jshint.reporter('default') )
65+
.pipe( jshint.reporter('fail') )
5666
;
5767
});
5868

59-
gulp.task( 'js:min', executeMinifiedBuild( build ) );
6069
gulp.task( 'js', executeBuild( build ) );
61-
gulp.task( 'default', ['js:min', 'js']);
70+
gulp.task( 'js:min', ['js'], executeMinifiedBuild( build ) );
71+
72+
gulp.task( 'default', ['js:min']);

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rekord-debug",
3-
"version": "1.0.2",
3+
"version": "1.4.0",
44
"homepage": "https://github.com/Rekord/rekord-debug",
55
"authors": [
66
"Philip Diffenderfer <pdiffenderfer@gmail.com>"
@@ -24,6 +24,6 @@
2424
"tests"
2525
],
2626
"dependencies": {
27-
"rekord": "^1.2.0"
27+
"rekord": "~1.4.0"
2828
}
2929
}

build/rekord-debug.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* rekord-debug 1.4.0 - A rekord binding to console - implementing Rekord.debug by Philip Diffenderfer */
12
(function(global, Rekord)
23
{
34

build/rekord-debug.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/rekord-debug.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rekord-debug",
3-
"version": "1.0.2",
3+
"version": "1.4.0",
44
"description": "A rekord binding to console - implementing Rekord.debug",
55
"author": "Philip Diffenderfer",
66
"license": "MIT",
@@ -15,8 +15,10 @@
1515
"gulp": "^3.8.10",
1616
"gulp-check-filesize": "^2.0.1",
1717
"gulp-concat": "^2.4.3",
18+
"gulp-insert": "^0.5.0",
1819
"gulp-jshint": "^2.0.1",
1920
"gulp-load-plugins": "^1.2.4",
21+
"gulp-rename": "^1.2.2",
2022
"gulp-shell": "^0.5.2",
2123
"gulp-sourcemaps": "^1.3.0",
2224
"gulp-uglify": "^1.0.2",
@@ -25,6 +27,6 @@
2527
"jshint": "^2.9.2"
2628
},
2729
"dependencies": {
28-
"rekord": "^1.2.0"
30+
"rekord": "~1.4.0"
2931
}
3032
}

0 commit comments

Comments
 (0)