Skip to content

Commit b50e25e

Browse files
committed
Merge branch 'develop'. This is now the Velocity V2 beta branch
2 parents 6dd28a2 + e26106a commit b50e25e

File tree

153 files changed

+24433
-35344
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+24433
-35344
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/nbproject
22
/node_modules
3+
/build

Gruntfile.js

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,5 @@
11
module.exports = function(grunt) {
2+
"use strict";
23

3-
grunt.initConfig({
4-
pkg: grunt.file.readJSON('package.json'),
5-
jshint: {
6-
files: ['velocity.js', 'velocity.ui.js'],
7-
options: {
8-
browser: true,
9-
curly: true,
10-
eqeqeq: true,
11-
eqnull: true,
12-
esversion: 3, // Velocity 1.*
13-
forin: false, // Should really be true
14-
freeze: true,
15-
funcscope: true,
16-
futurehostile: true,
17-
laxbreak: true, // Makes it very hard to write readable code in some places without this option
18-
loopfunc: true, // Velocity 1.*
19-
nocomma: true,
20-
nonbsp: true,
21-
notypeof: true,
22-
strict: true,
23-
globals: {
24-
jQuery: true
25-
}
26-
}
27-
},
28-
uglify: {
29-
my_target: {
30-
options: {
31-
preserveComments: /^!/,
32-
screwIE8: false // Velocity 1.*
33-
},
34-
files: {
35-
'velocity.min.js': ['velocity.js'],
36-
'velocity.ui.min.js': ['velocity.ui.js']
37-
}
38-
}
39-
}
40-
});
41-
42-
grunt.loadNpmTasks('grunt-contrib-jshint');
43-
grunt.loadNpmTasks('grunt-contrib-uglify');
44-
45-
grunt.registerTask('default', ['jshint', 'uglify']);
4+
require("load-grunt-tasks")(grunt);
465
};

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# Velocity 1.5.1
1+
# Velocity 2.0.0 beta
2+
3+
# This is a public beta - files are *not* available on CDN
24

35
## Docs
4-
[http://VelocityJS.org](http://velocityjs.org)
6+
[https://github.com/julianshapiro/velocity/wiki](https://github.com/julianshapiro/velocity/wiki)
57

68
## News
79
WhatsApp, Tumblr, Windows, Samsung, Uber, and thousands of other companies rely on Velocity. Visit [Libscore.com](http://libscore.com/#$.Velocity) to see which sites use Velocity on their homepage.
@@ -14,17 +16,17 @@ NPM: https://www.npmjs.com/package/velocity-react
1416
## Quickstart
1517
### Velocity (CDN, choose one of them):
1618
```html
17-
<script src="//cdn.jsdelivr.net/npm/velocity-animate@1.5/velocity.min.js"></script>
18-
<script src="//cdnjs.cloudflare.com/ajax/libs/velocity/1.5.1/velocity.min.js"></script>
19+
<script src="//cdn.jsdelivr.net/velocity/2.0/velocity.min.js"></script>
20+
<script src="//cdnjs.cloudflare.com/ajax/libs/velocity/2.0.0/velocity.min.js"></script>
1921
```
2022

2123
### Velocity UI pack (CDN, choose one of them):
2224
```html
23-
<script src="//cdn.jsdelivr.net/npm/velocity-animate@1.5/velocity.ui.min.js"></script>
24-
<script src="//cdnjs.cloudflare.com/ajax/libs/velocity/1.5.1/velocity.ui.min.js"></script>
25+
<script src="//cdn.jsdelivr.net/velocity/2.0/velocity.ui.min.js"></script>
26+
<script src="//cdnjs.cloudflare.com/ajax/libs/velocity/2.0.0/velocity.ui.min.js"></script>
2527
```
2628

27-
> Please note that JSDelivr will automatically supply the latest release, while CloudFlare needs to ask for a specific version.
29+
> Please note that JSDelivr can automatically supply the latest release, while CloudFlare needs to ask for a specific version.
2830
2931
### Package managers:
3032
_npm:_ `npm install velocity-animate`<br>
@@ -34,6 +36,7 @@ _bower:_ `bower install velocity`
3436
Ask on [StackOverflow](http://stackoverflow.com/tags/velocity.js) (make sure you add the `[velocity.js]` and `[javascript]` tags).
3537

3638
## Updates
39+
- **[2.0](https://github.com/julianshapiro/velocity/compare/1.5.0...2.0.0)**: Typescript update and complete refactoring.
3740
- **[1.5](https://github.com/julianshapiro/velocity/compare/1.4.0...1.5.0)**: Bugfixes, IE9 compatibility fixes.
3841
- **[1.4](https://github.com/julianshapiro/velocity/compare/1.3.0...1.4.0)**: Pause / Resume (per element or global).<br>
3942
Forcefed string animation (just have matching number spaces) including unit conversions and colour names (ie `background:["rgba(red,0.1)", "blue"]`).
@@ -57,6 +60,6 @@ Various fixes including ticker (loading Velocity in a background window) and col
5760

5861
====
5962

60-
[MIT License](LICENSE.md). © Julian Shapiro (http://twitter.com/shapiro).<br>
61-
[Stripe](https://stripe.com/blog/stripe-open-source-retreat) sponsors Velocity's development.<br>
62-
[BrowserStack](http://www.browserstack.com/) provides testing services.
63+
[MIT License](LICENSE.md). © Julian Shapiro (http://twitter.com/shapiro).
64+
65+
[![Kiss My Button](https://presskit.kissmybutton.gr/logos/kissmybutton-logo-small.png)](https://kissmybutton.gr) sponsors Velocity's development.

V2_CHANGES.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Major Changes in Velocity V2
2+
3+
* Transforms - Use these directly within CSS, don't try the old shortcuts as they don't exist.
4+
* Colors - All web colors are supported internally.
5+
* SVG - All SVG attributes are supported internally, though they must be placed on the correct type of element.
6+
* Loop - This no longer copies the animation call, it calls it multiple times.
7+
* Repeat - This is almost identical to loop, but only runs one way.
8+
* Chaining - Chaining is awesome, use it. Chained commands are designed to operate on the chained animation, not on the elements within it.
9+
* Styles - Use `element.velocity("style", "propertyName"[, value])`, the old .Hook has gone.
10+
* Per-element - Animations are now copied per-element, and not one a one-animation-per-array basis as in other libraries (and old Velocity v1).
11+
* Sync - You can now de-sync animations so they start immediately per-element, rather than waiting for all to be ready.
12+
* Speed - You can control the speed of the animation playback.
13+
* Delay - You can pass a negative number to start inside the animation rather than just having a delay before it.
14+
* There are APIs for extending Velocity - see the various register* commands.
15+
* Display - This is a property, no longer an option.
16+
* Visibility - This is a property, no longer an option.
17+
18+
# Currently disabled / not updated:
19+
20+
* UI-Pack
21+
* Reverse
22+
* Scroll (working, but not happy with interface - it's a property if people want to play, alias of scrollTop, there's also scrollLeft)

grunt/aliases/default.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = function(grunt) {
2+
grunt.registerTask("default", [
3+
"ts",
4+
"uglify"
5+
]);
6+
};

grunt/aliases/major.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = function(grunt) {
2+
grunt.registerTask("patch", [
3+
"bump-only:patch",
4+
"default",
5+
"bump-commit"
6+
]);
7+
};

grunt/aliases/minor.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = function(grunt) {
2+
grunt.registerTask("patch", [
3+
"bump-only:patch",
4+
"default",
5+
"bump-commit"
6+
]);
7+
};

grunt/aliases/patch.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = function(grunt) {
2+
grunt.registerTask("patch", [
3+
"bump-only:patch",
4+
"default",
5+
"bump-commit"
6+
]);
7+
};

grunt/options/bump.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
main: {
3+
options: {
4+
updateConfigs: ["pkg"],
5+
commitFiles: ["package.json"],
6+
pushTo: "origin"
7+
}
8+
}
9+
};

grunt/options/pkg.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = function(grunt) {
2+
return grunt.file.readJSON("package.json");
3+
};

grunt/options/ts.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
options: {
3+
"fast": "never"
4+
},
5+
main: {
6+
"tsconfig": true,
7+
"files": {
8+
"build/velocity.js": ["src/app.ts"]
9+
}
10+
},
11+
test: {
12+
"tsconfig": "test/tsconfig.json",
13+
"files": {
14+
"test/test.js": ["test/src/app.ts"]
15+
}
16+
}
17+
};

grunt/options/uglify.js

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
module.exports = {
2+
main: {
3+
options: {
4+
sourceMap: {
5+
root: "src/",
6+
includeSources: true
7+
},
8+
sourceMapIn: "build/velocity.js.map",
9+
compress: false,
10+
mangle: false,
11+
beautify: true,
12+
output: {
13+
comments: "all"
14+
},
15+
banner: `/*! VelocityJS.org (<%= pkg.version %>) (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
16+
(function(root, factory) {
17+
if (typeof define === 'function' && define.amd) {
18+
define('Velocity', [], function() {
19+
return (root['Velocity'] = factory());
20+
});
21+
} else if (typeof module === 'object' && module.exports) {
22+
module.exports = factory();
23+
} else {
24+
root['Velocity'] = factory();
25+
}
26+
}(this, function() {
27+
`,
28+
footer: `
29+
return VelocityFn;
30+
}));
31+
`
32+
},
33+
files: {
34+
"velocity.js": ["build/velocity.js"]
35+
}
36+
},
37+
min: {
38+
options: {
39+
sourceMap: false,
40+
banner: `/*! <%= pkg.name %> v<%= pkg.version %> (<%= grunt.template.today('dddd dS mmmm yyyy, h:MM:ss TT') %>) */`,
41+
compress: {
42+
drop_console: true,
43+
drop_debugger: true,
44+
pure_getters: true,
45+
unsafe: true
46+
}
47+
},
48+
files: {
49+
"velocity.min.js": ["velocity.js"],
50+
"velocity.ui.min.js": ["velocity.ui.js"]
51+
}
52+
}
53+
};

grunt/options/watch.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
main: {
3+
files: ["index.d.ts", "src/**/*.ts"],
4+
tasks: ["default"]
5+
},
6+
test: {
7+
files: ["test/src/**/*.ts"],
8+
tasks: ["ts:test"]
9+
}
10+
};

0 commit comments

Comments
 (0)