Skip to content

Commit d6eec4c

Browse files
committed
chore(Build): Add license to css files
License banner is now added to css files automatically. Also updated LICENSE.md date and the license banner formatting Fixes #1316
1 parent 04d2fa6 commit d6eec4c

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

Gruntfile.js

+11-6
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ module.exports = function(grunt) {
3131
stable_version: util.getStableVersion(),
3232
dist: 'dist',
3333
site: process.env.TRAVIS ? 'ui-grid.info' : '127.0.0.1:<%= connect.docs.options.port %>',
34-
banner: '/*! <%= pkg.title || pkg.name %> - v<%= version %> - ' +
34+
banner: '/*!\n' +
35+
' * <%= pkg.title || pkg.name %> - v<%= version %> - ' +
3536
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
3637
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
37-
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
38-
' License: <%= pkg.license %> */\n',
38+
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
39+
' License: <%= pkg.license %> \n */\n\n',
3940

4041
shell: {
4142
options: {
@@ -128,18 +129,22 @@ module.exports = function(grunt) {
128129
less: {
129130
dist: {
130131
// paths: ['/bower_components/bootstrap'],
132+
options: {
133+
banner: '<%= banner %>'
134+
},
131135
files: {
132136
// 'dist/release/<%= pkg.name %>.css': ['src/less/main.less', 'src/features/*/less/**/*.less', '.tmp/icon/icons.data.svg.css'],
133137
'dist/release/<%= pkg.name %>.css': ['src/less/main.less', 'src/features/*/less/**/*.less', '.tmp/font/ui-grid-codes.css']
134138
}
135139
},
136140
min: {
141+
options: {
142+
banner: '<%= banner %>',
143+
compress: true
144+
},
137145
files: {
138146
// 'dist/release/<%= pkg.name %>.min.css': ['src/less/main.less', 'src/features/*/less/**/*.less', '.tmp/icon/icons.data.svg.css']
139147
'dist/release/<%= pkg.name %>.min.css': ['src/less/main.less', 'src/features/*/less/**/*.less', '.tmp/font/ui-grid-codes.css']
140-
},
141-
options: {
142-
compress: true
143148
}
144149
}
145150
},

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2012 the AngularUI Team, http://angular-ui.github.com
3+
Copyright (c) 2015 the AngularUI Team, http://angular-ui.github.com
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"grunt-contrib-jasmine": "~0.5",
3636
"grunt-contrib-clean": "~0.5",
3737
"grunt-contrib-jshint": "~0.7",
38-
"grunt-contrib-less": "~0.8",
38+
"grunt-contrib-less": "~1.0",
3939
"grunt-angular-templates": "~0.5",
4040
"grunt-contrib-connect": "~0.5",
4141
"grunt-fontello": "~0.1",

0 commit comments

Comments
 (0)