mirror of
https://github.com/animate-css/animate.css.git
synced 2024-11-13 07:41:08 +01:00
Implement @RadLikeWhoa’s build script
This commit is contained in:
parent
25448e347c
commit
79c9fb741b
6 changed files with 315 additions and 17 deletions
97
.animate-config
Normal file
97
.animate-config
Normal file
|
@ -0,0 +1,97 @@
|
|||
{
|
||||
|
||||
"attention_seekers": {
|
||||
"bounce": true,
|
||||
"flash": true,
|
||||
"pulse": true,
|
||||
"shake": true,
|
||||
"swing": true,
|
||||
"tada": true,
|
||||
"wobble": true
|
||||
},
|
||||
|
||||
"bouncing_entrances": {
|
||||
"bounceIn": true,
|
||||
"bounceInDown": true,
|
||||
"bounceInLeft": true,
|
||||
"bounceInRight": true,
|
||||
"bounceInUp": true
|
||||
},
|
||||
|
||||
"bouncing_exits": {
|
||||
"bounceOut": true,
|
||||
"bounceOutDown": true,
|
||||
"bounceOutLeft": true,
|
||||
"bounceOutRight": true,
|
||||
"bounceOutUp": true
|
||||
},
|
||||
|
||||
"fading_entrances": {
|
||||
"fadeIn": true,
|
||||
"fadeInDown": true,
|
||||
"fadeInDownBig": true,
|
||||
"fadeInLeft": true,
|
||||
"fadeInLeftBig": true,
|
||||
"fadeInRight": true,
|
||||
"fadeInRightBig": true,
|
||||
"fadeInUp": true,
|
||||
"fadeInUpBig": true
|
||||
},
|
||||
|
||||
"fading_exits": {
|
||||
"fadeOut": true,
|
||||
"fadeOutDown": true,
|
||||
"fadeOutDownBig": true,
|
||||
"fadeOutLeft": true,
|
||||
"fadeOutLeftBig": true,
|
||||
"fadeOutRight": true,
|
||||
"fadeOutRightBig": true,
|
||||
"fadeOutUp": true,
|
||||
"fadeOutUpBig": true
|
||||
},
|
||||
|
||||
"flippers": {
|
||||
"flip": true,
|
||||
"flipInX": true,
|
||||
"flipInY": true,
|
||||
"flipOutX": true,
|
||||
"flipOutY": true
|
||||
},
|
||||
|
||||
"lightspeed": {
|
||||
"lightspeedIn": true,
|
||||
"lightspeedOut": true
|
||||
},
|
||||
|
||||
"rotating_entrances": {
|
||||
"rotateIn": true,
|
||||
"rotateInDownLeft": true,
|
||||
"rotateInDownRight": true,
|
||||
"rotateInUpLeft": true,
|
||||
"rotateInUpRight": true
|
||||
},
|
||||
|
||||
"rotating_exits": {
|
||||
"rotateOut": true,
|
||||
"rotateOutDownLeft": true,
|
||||
"rotateOutDownRight": true,
|
||||
"rotateOutUpLeft": true,
|
||||
"rotateOutUpRight": true
|
||||
},
|
||||
|
||||
"sliders": {
|
||||
"slideInDown": true,
|
||||
"slideInLeft": true,
|
||||
"slideInRight": true,
|
||||
"slideOutLeft": true,
|
||||
"slideOutRight": true,
|
||||
"slideOutUp": true
|
||||
},
|
||||
|
||||
"specials": {
|
||||
"hinge": true,
|
||||
"rollIn": true,
|
||||
"rollOut": true
|
||||
}
|
||||
|
||||
}
|
31
Gruntfile.js
31
Gruntfile.js
|
@ -9,7 +9,7 @@ module.exports = function(grunt) {
|
|||
// _base.css required for .animated helper class
|
||||
'source/_base.css',
|
||||
'source/**/*.css'
|
||||
]
|
||||
],
|
||||
dest: 'animate.css'
|
||||
}
|
||||
},
|
||||
|
@ -40,10 +40,11 @@ module.exports = function(grunt) {
|
|||
css: {
|
||||
files: [
|
||||
'source/**/*',
|
||||
'!node_modules'
|
||||
'!node_modules',
|
||||
'.animate-config'
|
||||
],
|
||||
// Run Sass, autoprefixer, and CSSO
|
||||
tasks: ['concat', 'autoprefixer', 'csso'],
|
||||
tasks: ['concat-anim', 'autoprefixer', 'csso'],
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,4 +56,28 @@ module.exports = function(grunt) {
|
|||
grunt.loadNpmTasks('grunt-autoprefixer');
|
||||
grunt.loadNpmTasks('grunt-csso');
|
||||
grunt.registerTask('default', ['watch']);
|
||||
|
||||
grunt.registerTask('concat-anim', 'Concatenates activated animations', function () {
|
||||
var config = grunt.file.readJSON('.animate-config'),
|
||||
target = [ 'source/_base.css' ],
|
||||
count = 0
|
||||
|
||||
for (var cat in config) {
|
||||
for (var file in config[cat]) {
|
||||
if (config[cat][file]) {
|
||||
target.push('source/' + cat + '/' + file + '.css')
|
||||
count++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!count) {
|
||||
grunt.log.writeln('No animations activated.')
|
||||
}
|
||||
|
||||
grunt.log.writeln(count + (count > 1 ? ' animations' : ' animation') + ' activated.')
|
||||
|
||||
grunt.config('concat', { 'animate.css': target })
|
||||
grunt.task.run('concat')
|
||||
});
|
||||
};
|
196
animate.css
vendored
196
animate.css
vendored
File diff suppressed because it is too large
Load diff
2
animate.min.css
vendored
2
animate.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -12,10 +12,6 @@ The above copyright notice and this permission notice shall be included in all c
|
|||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
body { /* Addresses a small issue in webkit: http://bit.ly/NEdoDq */
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
.animated {
|
||||
animation-duration: 1s;
|
||||
animation-fill-mode: both;
|
||||
|
|
|
@ -22,6 +22,6 @@
|
|||
}
|
||||
|
||||
.animated.flip {
|
||||
backface-visibility: visible !important;
|
||||
backface-visibility: visible;
|
||||
animation-name: flip;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue