Add `usebanner` task and banner template

refer to the values of properties within package.json file (project name, current version, etc..)
This commit is contained in:
1UP 2015-11-09 01:49:46 +09:00
parent 2a9f3ca6b1
commit fe3cf0a2a9
4 changed files with 53 additions and 26 deletions

View File

@ -31,6 +31,40 @@ module.exports = function(grunt) {
}
},
banner: [
'/*!',
' * <%= _.capitalize(pkg.name) %> -<%= pkg.homepage %>',
' * Version - <%= pkg.version %>',
' * Licensed under the MIT license - http://opensource.org/licenses/MIT',
' *',
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>',
' */',
].join('\n'),
usebanner: {
options: {
position: 'replace',
linebreak: false,
replace: /\/\*!(\s+)?inject-banner(\s+)?\*\//
},
development: {
options: {
banner: '<%= banner %>'
},
files: {
src: [ 'animate.css']
}
},
production: {
options: {
banner: '\n<%= banner %>\n'
},
files: {
src: ['animate.min.css']
}
}
},
watch: {
css: {
files: [ 'source/**/*', 'animate-config.json' ],
@ -73,7 +107,7 @@ module.exports = function(grunt) {
// register task
grunt.registerTask('concat-anim', 'Concatenates activated animations', concatAnim); // custom task
grunt.registerTask('default', ['concat-anim', 'autoprefixer', 'cssmin']);
grunt.registerTask('default', ['concat-anim', 'autoprefixer', 'cssmin', 'usebanner']);
grunt.registerTask('dev', ['watch']);
};

20
animate.css vendored
View File

@ -1,12 +1,12 @@
@charset "UTF-8";
/*!
Animate.css - http://daneden.me/animate
Version - 3.4.0
Licensed under the MIT license - http://opensource.org/licenses/MIT
Copyright (c) 2015 Daniel Eden
*/
* Animate.css -http://daneden.me/animate
* Version - 3.4.0
* Licensed under the MIT license - http://opensource.org/licenses/MIT
*
* Copyright (c) 2015 Daniel Eden
*/
.animated {
-webkit-animation-duration: 1s;
@ -25,18 +25,14 @@ Copyright (c) 2015 Daniel Eden
animation-duration: 2s;
}
.animated.flipOutX,
.animated.flipOutY,
.animated.bounceIn,
.animated.bounceOut {
-webkit-animation-duration: .75s;
animation-duration: .75s;
}
.animated.flipOutX,
.animated.flipOutY {
-webkit-animation-duration: .75s;
animation-duration: .75s;
}
@-webkit-keyframes bounce {
from, 20%, 53%, 80%, to {
-webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);

16
animate.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -1,11 +1,6 @@
@charset "UTF-8";
/*!
Animate.css - http://daneden.me/animate
Version - 3.4.0
Licensed under the MIT license - http://opensource.org/licenses/MIT
Copyright (c) 2015 Daniel Eden
*/
/*! inject-banner */
.animated {
animation-duration: 1s;