Skip to content

Commit

Permalink
Add usebanner task and banner template
Browse files Browse the repository at this point in the history
refer to the values of properties within package.json file (project name, current version, etc..)
  • Loading branch information
woneob committed Nov 8, 2015
1 parent 2a9f3ca commit fe3cf0a
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 26 deletions.
36 changes: 35 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' ],
Expand Down Expand Up @@ -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 changes: 8 additions & 12 deletions animate.css
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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);
Expand Down
16 changes: 9 additions & 7 deletions animate.min.css

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions source/_base.css
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit fe3cf0a

Please sign in to comment.