Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
chore(build): add banner into build files
Browse files Browse the repository at this point in the history
Closes #1493
  • Loading branch information
bekos authored and pkozlowski-opensource committed Dec 31, 2013
1 parent 5f8e3e8 commit e986485
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
19 changes: 14 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ module.exports = function(grunt) {
meta: {
modules: 'angular.module("ui.bootstrap", [<%= srcModules %>]);',
tplmodules: 'angular.module("ui.bootstrap.tpls", [<%= tplModules %>]);',
all: 'angular.module("ui.bootstrap", ["ui.bootstrap.tpls", <%= srcModules %>]);'
all: 'angular.module("ui.bootstrap", ["ui.bootstrap.tpls", <%= srcModules %>]);',
banner: ['/*',
' * <%= pkg.name %>',
' * <%= pkg.homepage %>\n',
' * Version: <%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>',
' * License: <%= pkg.license %>',
' */\n'].join('\n')
},
delta: {
docs: {
Expand All @@ -46,14 +52,14 @@ module.exports = function(grunt) {
concat: {
dist: {
options: {
banner: '<%= meta.modules %>\n'
banner: '<%= meta.banner %><%= meta.modules %>\n'
},
src: [], //src filled in by build task
dest: '<%= dist %>/<%= filename %>-<%= pkg.version %>.js'
},
dist_tpls: {
options: {
banner: '<%= meta.all %>\n<%= meta.tplmodules %>\n'
banner: '<%= meta.banner %><%= meta.all %>\n<%= meta.tplmodules %>\n'
},
src: [], //src filled in by build task
dest: '<%= dist %>/<%= filename %>-tpls-<%= pkg.version %>.js'
Expand Down Expand Up @@ -83,12 +89,15 @@ module.exports = function(grunt) {
}
},
uglify: {
options: {
banner: '<%= meta.banner %>'
},
dist:{
src:['<%= dist %>/<%= filename %>-<%= pkg.version %>.js'],
src:['<%= concat.dist.dest %>'],
dest:'<%= dist %>/<%= filename %>-<%= pkg.version %>.min.js'
},
dist_tpls:{
src:['<%= dist %>/<%= filename %>-tpls-<%= pkg.version %>.js'],
src:['<%= concat.dist_tpls.dest %>'],
dest:'<%= dist %>/<%= filename %>-tpls-<%= pkg.version %>.min.js'
}
},
Expand Down
2 changes: 1 addition & 1 deletion misc/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ <h1><%= module.displayName %><small>
<footer class="footer">
<div class="container">
<p>Designed and built by <a href="https://github.com/angular-ui?tab=members" target="_blank">Angular-UI team</a> and <a href="https://github.com/angular-ui/bootstrap/graphs/contributors" target="_blank">contributors</a>.</p>
<p>Code licensed under <a href="https://github.com/angular-ui/bootstrap/blob/master/LICENSE">MIT License</a>.</p>
<p>Code licensed under <a href="https://github.com/angular-ui/bootstrap/blob/master/LICENSE"><%= pkg.license %> License</a>.</p>
<p><a href="https://github.com/angular-ui/bootstrap/issues?state=open">Issues</a></p>
</div>
</footer>
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"author": "https://github.com/angular-ui/bootstrap/graphs/contributors",
"name": "angular-ui-bootstrap",
"version": "0.10.0-SNAPSHOT",
"homepage": "http://angular-ui.github.io/bootstrap/",
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.1",
Expand All @@ -17,5 +18,6 @@
"node-markdown": "0.1.1",
"semver": "~1.1.4",
"shelljs": "~0.1.4"
}
},
"license": "MIT"
}

0 comments on commit e986485

Please sign in to comment.