Skip to content

Commit 6a61e67

Browse files
committed
Add license header to build artifacts
This adds a license header to outputs with a structure similar to that of Semantic-UI. Also references the same license in package.json as in the project root and adds homepage to package.json. #4
1 parent 04d5b2f commit 6a61e67

5 files changed

Lines changed: 45 additions & 6 deletions

File tree

Gulpfile.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,28 @@
33
var gulp = require('gulp');
44
var sourcemaps = require('gulp-sourcemaps');
55
var plugins = require('gulp-load-plugins')();
6+
var pkg = require('./package.json');
67
var src = [
78
'src/sm-core.js',
89
'src/sm-addons.js',
910
'src/*/*.js'
1011
];
1112

13+
var banner = ['/**',
14+
' * <%= pkg.name %> - <%= pkg.version %>',
15+
' * <%= pkg.description %>',
16+
' * ',
17+
' * <%= pkg.homepage %>',
18+
' * Released under the <%= pkg.license %> license.',
19+
' * Copyright <%= (new Date()).getFullYear() %> <%= pkg.author %> and contributors.',
20+
' */',
21+
''].join('\n');
22+
1223
gulp.task('build', function () {
1324
return gulp
1425
.src( src )
1526
.pipe( plugins.concat('angular-semantic-ui.js') )
27+
.pipe( plugins.header(banner, { pkg : pkg } ))
1628
.pipe( gulp.dest('.') );
1729
});
1830

@@ -23,6 +35,7 @@ gulp.task('build-min', function () {
2335
.pipe( plugins.concat('angular-semantic-ui.min.js') )
2436
.pipe( plugins.uglify({mangle:false}) )
2537
.pipe( sourcemaps.write('.') )
38+
.pipe( plugins.header(banner, { pkg : pkg } ))
2639
.pipe( gulp.dest('.') );
2740
});
2841

angular-semantic-ui.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/**
2+
* SemanticUI-Angular - 1.0.0
3+
* Angular Directives for Semantic UI
4+
*
5+
* https://github.com/ClickerMonkey/SemanticUI-Angular
6+
* Released under the MIT license.
7+
* Copyright 2015 Philip Diffenderfer and contributors.
8+
*/
19
(function(app)
210
{
311

angular-semantic-ui.min.js

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

angular-semantic-ui.min.js.map

Lines changed: 9 additions & 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,16 +1,18 @@
11
{
22
"name": "SemanticUI-Angular",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Angular Directives for Semantic UI",
55
"author": "Philip Diffenderfer",
6-
"license": "proprietary",
6+
"license": "MIT",
7+
"homepage": "https://github.com/ClickerMonkey/SemanticUI-Angular",
78
"repository": {
89
"type": "git",
910
"url": "git://github.com/ClickerMonkey/SemanticUI-Angular.git"
1011
},
1112
"devDependencies": {
1213
"gulp": "^3.9.0",
1314
"gulp-concat": "^2.4.3",
15+
"gulp-header": "^1.7.1",
1416
"gulp-imagemin": "^2.1.0",
1517
"gulp-less": "^3.0.3",
1618
"gulp-load-plugins": "^0.10.0",

0 commit comments

Comments
 (0)