Comparing version 0.4.2 to 0.4.3
@@ -308,2 +308,3 @@ jest.dontMock('../animar'); | ||
animar._add = jest.genMockFn(); | ||
window.requestAnimationFrame = jest.genMockFn(); | ||
defaultChainOptions = { delay: 0, currentDuration: 25, totalDuration: 120, animationList: [ | ||
@@ -310,0 +311,0 @@ { loop: false, wait: 0, delay: 10, totalIterations: 50 } |
@@ -65,3 +65,3 @@ var EasingFactory = require("./ease"), | ||
Animar.prototype._thenChainFunction = function(chainOptions) { | ||
var self = this; // maintain reference to Animar instance through the forEach calls | ||
var self = this; | ||
return function(element, attributes, options) { | ||
@@ -76,2 +76,3 @@ chainOptions.totalDuration = chainOptions.totalDuration + chainOptions.currentDuration; | ||
Animar.prototype._loopChainFunction = function(chainOptions) { | ||
var self = this; | ||
return function() { | ||
@@ -84,2 +85,3 @@ chainOptions.totalDuration = chainOptions.totalDuration + chainOptions.currentDuration; | ||
} | ||
self._requestTick(); | ||
}; | ||
@@ -86,0 +88,0 @@ }; |
{ | ||
"name": "animar", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"description": "a modern, focused, flexible javascript animation library.", | ||
@@ -35,3 +35,2 @@ "keywords": [ | ||
}, | ||
"jshintConfig": {}, | ||
"jest": { | ||
@@ -54,9 +53,9 @@ "collectCoverage": true, | ||
"devDependencies": { | ||
"codeclimate-test-reporter": "0.0.4", | ||
"compression-webpack-plugin": "^0.1.2", | ||
"jest-cli": "^0.4.0", | ||
"jshint": "^2.6.0", | ||
"rimraf": "latest", | ||
"lodash": "^3.3.1", | ||
"rimraf": "^2.3.1", | ||
"webpack": "^1.6.0" | ||
} | ||
} |
[](https://travis-ci.org/vincentriemer/animar) [](https://david-dm.org/vincentriemer/animar) [](https://david-dm.org/vincentriemer/animar#info=devDependencies) [](http://badge.fury.io/js/animar) [](https://codeclimate.com/github/vincentriemer/animar) [](https://codeclimate.com/github/vincentriemer/animar) | ||
# Animar | ||
**NOTE**: This is still very much a work in progress (espcially in the documentation department). If you attempt to use this in its current state, you are doing so at your own risk. | ||
## Initialization | ||
```javascript | ||
var animar = new Animar(); | ||
``` | ||
## Animating an Element | ||
The Animar library only provides one function for animating an element. The syntax is as follows: | ||
``` | ||
animar.add([DOMElement element], [Object attributeMap], [Object options]); | ||
``` |
var path = require('path'); | ||
module.exports = { | ||
entry: './lib/animar.js', | ||
output: { | ||
@@ -13,3 +11,2 @@ path: path.join(__dirname, 'dist'), | ||
} | ||
}; |
var webpack = require('webpack'), | ||
path = require('path'), | ||
CompressionPlugin = require('compression-webpack-plugin'); | ||
CompressionPlugin = require('compression-webpack-plugin'), | ||
_ = require('lodash'); | ||
module.exports = { | ||
entry: './lib/animar.js', | ||
module.exports = _.merge(require('./webpack.config.js'), { | ||
output: { | ||
path: path.join(__dirname, 'dist'), | ||
filename: 'animar.min.js', | ||
library: 'Animar', | ||
libraryTarget: 'umd' | ||
filename: 'animar.min.js' | ||
}, | ||
plugins: [ | ||
@@ -29,2 +22,2 @@ new webpack.optimize.OccurenceOrderPlugin(), | ||
] | ||
}; | ||
}); |
@@ -1,16 +0,8 @@ | ||
var path = require('path'); | ||
var _ = require('lodash'); | ||
var pjson = require('./package.json'); | ||
module.exports = { | ||
entry: './lib/animar.js', | ||
module.exports = _.merge(require('./webpack.config.js'), { | ||
output: { | ||
path: path.join(__dirname, 'dist'), | ||
filename: 'animar-v' + pjson.version + '.js', | ||
library: 'Animar', | ||
libraryTarget: 'umd' | ||
filename: 'animar-v' + pjson.version + '.js' | ||
} | ||
}; | ||
}); |
@@ -1,31 +0,9 @@ | ||
var webpack = require('webpack'), | ||
path = require('path'), | ||
CompressionPlugin = require('compression-webpack-plugin'); | ||
var path = require('path'), | ||
_ = require('lodash'), | ||
pjson = require('./package.json'); | ||
var pjson = require('./package.json'); | ||
module.exports = { | ||
entry: './lib/animar.js', | ||
module.exports = _.merge(require('./webpack.config.minified.js'), { | ||
output: { | ||
path: path.join(__dirname, 'dist'), | ||
filename: 'animar-v' + pjson.version + '.min.js', | ||
library: 'Animar', | ||
libraryTarget: 'umd' | ||
}, | ||
plugins: [ | ||
new webpack.optimize.OccurenceOrderPlugin(), | ||
new webpack.optimize.DedupePlugin(), | ||
new webpack.optimize.UglifyJsPlugin({ | ||
compress: { | ||
warnings: false, | ||
drop_console: true, | ||
hoist_vars: true, | ||
unsafe: true | ||
} | ||
}), | ||
new CompressionPlugin() | ||
] | ||
}; | ||
filename: 'animar-v' + pjson.version + '.min.js' | ||
} | ||
}); |
Sorry, the diff of this file is not supported yet
20
50242
1176