Skip to content

Commit d546ffd

Browse files
committed
Include header at top of files showing version and license
1 parent 5d5c1e6 commit d546ffd

7 files changed

Lines changed: 64 additions & 28 deletions

File tree

dist/angular-chart.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/*!
2+
* angular-chart.js - An angular.js wrapper for Chart.js
3+
* http://jtblin.github.io/angular-chart.js/
4+
* Version: 1.0.0-alpha8
5+
*
6+
* Copyright 2016 Jerome Touffe-Blin
7+
* Released under the BSD-2-Clause license
8+
* https://github.com/jtblin/angular-chart.js/blob/master/LICENSE
9+
*/
110
(function (factory) {
211
'use strict';
312
if (typeof exports === 'object') {

dist/angular-chart.js.tar.gz

-554 Bytes
Binary file not shown.

dist/angular-chart.min.js

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

dist/angular-chart.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.

gulpfile.js

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,40 @@
11
(function () {
22
'use strict';
33

4+
var bumper = require('gulp-bump');
45
var fs = require('fs');
5-
var path = require('path');
6+
var git = require('gulp-git');
67
var gulp = require('gulp');
7-
var sourcemaps = require('gulp-sourcemaps');
8-
var uglify = require('gulp-uglify');
8+
var gzip = require('gulp-gzip');
9+
var header = require('gulp-header');
10+
var istanbul = require('gulp-istanbul');
11+
var istanbulReport = require('gulp-istanbul-report');
912
var jshint = require('gulp-jshint');
10-
var stylish = require('jshint-stylish');
1113
var jscs = require('gulp-jscs');
1214
var mocha = require('gulp-spawn-mocha');
13-
var tar = require('gulp-tar');
14-
var gzip = require('gulp-gzip');
15-
var bumper = require('gulp-bump');
16-
var git = require('gulp-git');
17-
var shell = require('gulp-shell');
15+
var mochaPhantomJS = require('gulp-mocha-phantomjs');
16+
var path = require('path');
17+
var pkg = require('./package.json');
1818
var rename = require('gulp-rename');
19-
var sequence = require('gulp-sequence');
2019
var rimraf = require('gulp-rimraf');
21-
var istanbul = require('gulp-istanbul');
22-
var istanbulReport = require('gulp-istanbul-report');
23-
var mochaPhantomJS = require('gulp-mocha-phantomjs');
20+
var sequence = require('gulp-sequence');
21+
var shell = require('gulp-shell');
22+
var sourcemaps = require('gulp-sourcemaps');
23+
var stylish = require('jshint-stylish');
24+
var tar = require('gulp-tar');
25+
var uglify = require('gulp-uglify');
26+
27+
var banner = ['/*!',
28+
' * <%= pkg.name %> - <%= pkg.description %>',
29+
' * <%= pkg.homepage %>',
30+
' * Version: <%= version %>',
31+
' *',
32+
' * Copyright 2016 Jerome Touffe-Blin',
33+
' * Released under the <%= pkg.license %> license',
34+
' * https://github.com/jtblin/angular-chart.js/blob/master/LICENSE',
35+
' */',
36+
''
37+
].join('\n');
2438

2539
gulp.task('clean', function () {
2640
return gulp.src('./dist/*', { read: false })
@@ -72,14 +86,16 @@
7286

7387
gulp.task('bower', function () {
7488
return gulp.src('./angular-chart.js')
89+
.pipe(header(banner, { pkg : pkg, version: version() } ))
7590
.pipe(gulp.dest('./dist'));
7691
});
7792

7893
gulp.task('js', ['lint', 'style', 'bower'], function () {
7994
return gulp.src('./angular-chart.js')
95+
.pipe(header(banner, { pkg : pkg, version: version() } ))
8096
.pipe(rename('angular-chart.min.js'))
8197
.pipe(sourcemaps.init())
82-
.pipe(uglify())
98+
.pipe(uglify({ preserveComments: 'license' }))
8399
.pipe(sourcemaps.write('./'))
84100
.pipe(gulp.dest('./dist'));
85101
});
@@ -147,8 +163,8 @@
147163
gulp.task('assets', sequence('clean', 'js', 'build'));
148164
gulp.task('test', sequence('cover', 'unit', 'integration', 'report'));
149165
gulp.task('check', sequence(['lint', 'style'], 'test'));
150-
gulp.task('deploy-patch', sequence('default', 'bump-patch', 'update', 'git-commit', 'git-push', 'npm'));
151-
gulp.task('deploy-minor', sequence('default', 'bump-minor', 'update', 'git-commit', 'git-push', 'npm'));
152-
gulp.task('deploy-major', sequence('default', 'bump-patch', 'update', 'git-commit', 'git-push', 'npm'));
166+
gulp.task('deploy-patch', sequence('docker-test', 'bump-patch', 'assets', 'update', 'git-commit', 'git-push', 'npm'));
167+
gulp.task('deploy-minor', sequence('docker-test', 'bump-minor', 'assets', 'update', 'git-commit', 'git-push', 'npm'));
168+
gulp.task('deploy-major', sequence('docker-test', 'bump-patch', 'assets', 'update', 'git-commit', 'git-push', 'npm'));
153169

154170
})();

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "angular-chart.js",
33
"version": "1.0.0-alpha8",
44
"description": "An angular.js wrapper for Chart.js",
5+
"homepage": "http://jtblin.github.io/angular-chart.js/",
56
"main": "dist/angular-chart.js",
67
"directories": {
78
"example": "examples"
@@ -30,10 +31,11 @@
3031
"font-awesome": "^4.6.3",
3132
"gm": "^1.22.0",
3233
"gulp": "^3.9.0",
33-
"gulp-bump": "^1.0.0",
34+
"gulp-bump": "^2.1.0",
3435
"gulp-git": "^1.7.1",
3536
"gulp-gzip": "^1.2.0",
36-
"gulp-istanbul": "^0.10.4",
37+
"gulp-header": "^1.8.3",
38+
"gulp-istanbul": "^1.0.0",
3739
"gulp-istanbul-report": "^0.0.1",
3840
"gulp-jscs": "^3.0.2",
3941
"gulp-jshint": "^2.0.0",
@@ -45,7 +47,7 @@
4547
"gulp-sourcemaps": "^1.0.0",
4648
"gulp-spawn-mocha": "^2.0.1",
4749
"gulp-tar": "^1.9.0",
48-
"gulp-uglify": "^1.4.2",
50+
"gulp-uglify": "^1.5.3",
4951
"imgur-node-api": "^0.1.0",
5052
"jshint": "^2.9.1",
5153
"jshint-stylish": "^2.0.1",

test/fixtures/coverage.js

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

0 commit comments

Comments
 (0)