Skip to content

Commit

Permalink
Merge branch 'develop'. This is now the Velocity V2 beta branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Rycochet committed Feb 1, 2018
2 parents 6dd28a2 + e26106a commit b50e25e
Show file tree
Hide file tree
Showing 153 changed files with 24,433 additions and 35,344 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/nbproject
/node_modules
/build
45 changes: 2 additions & 43 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,46 +1,5 @@
module.exports = function(grunt) {
"use strict";

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
files: ['velocity.js', 'velocity.ui.js'],
options: {
browser: true,
curly: true,
eqeqeq: true,
eqnull: true,
esversion: 3, // Velocity 1.*
forin: false, // Should really be true
freeze: true,
funcscope: true,
futurehostile: true,
laxbreak: true, // Makes it very hard to write readable code in some places without this option
loopfunc: true, // Velocity 1.*
nocomma: true,
nonbsp: true,
notypeof: true,
strict: true,
globals: {
jQuery: true
}
}
},
uglify: {
my_target: {
options: {
preserveComments: /^!/,
screwIE8: false // Velocity 1.*
},
files: {
'velocity.min.js': ['velocity.js'],
'velocity.ui.min.js': ['velocity.ui.js']
}
}
}
});

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');

grunt.registerTask('default', ['jshint', 'uglify']);
require("load-grunt-tasks")(grunt);
};
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Velocity 1.5.1
# Velocity 2.0.0 beta

# This is a public beta - files are *not* available on CDN

## Docs
[http://VelocityJS.org](http://velocityjs.org)
[https://github.com/julianshapiro/velocity/wiki](https://github.com/julianshapiro/velocity/wiki)

## News
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.
Expand All @@ -14,17 +16,17 @@ NPM: https://www.npmjs.com/package/velocity-react
## Quickstart
### Velocity (CDN, choose one of them):
```html
<script src="//cdn.jsdelivr.net/npm/velocity[email protected]/velocity.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/velocity/1.5.1/velocity.min.js"></script>
<script src="//cdn.jsdelivr.net/velocity/2.0/velocity.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/velocity/2.0.0/velocity.min.js"></script>
```

### Velocity UI pack (CDN, choose one of them):
```html
<script src="//cdn.jsdelivr.net/npm/velocity[email protected]/velocity.ui.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/velocity/1.5.1/velocity.ui.min.js"></script>
<script src="//cdn.jsdelivr.net/velocity/2.0/velocity.ui.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/velocity/2.0.0/velocity.ui.min.js"></script>
```

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

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

====

[MIT License](LICENSE.md). © Julian Shapiro (http://twitter.com/shapiro).<br>
[Stripe](https://stripe.com/blog/stripe-open-source-retreat) sponsors Velocity's development.<br>
[BrowserStack](http://www.browserstack.com/) provides testing services.
[MIT License](LICENSE.md). © Julian Shapiro (http://twitter.com/shapiro).

[![Kiss My Button](https://presskit.kissmybutton.gr/logos/kissmybutton-logo-small.png)](https://kissmybutton.gr) sponsors Velocity's development.
22 changes: 22 additions & 0 deletions V2_CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Major Changes in Velocity V2

* Transforms - Use these directly within CSS, don't try the old shortcuts as they don't exist.
* Colors - All web colors are supported internally.
* SVG - All SVG attributes are supported internally, though they must be placed on the correct type of element.
* Loop - This no longer copies the animation call, it calls it multiple times.
* Repeat - This is almost identical to loop, but only runs one way.
* Chaining - Chaining is awesome, use it. Chained commands are designed to operate on the chained animation, not on the elements within it.
* Styles - Use `element.velocity("style", "propertyName"[, value])`, the old .Hook has gone.
* 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).
* Sync - You can now de-sync animations so they start immediately per-element, rather than waiting for all to be ready.
* Speed - You can control the speed of the animation playback.
* Delay - You can pass a negative number to start inside the animation rather than just having a delay before it.
* There are APIs for extending Velocity - see the various register* commands.
* Display - This is a property, no longer an option.
* Visibility - This is a property, no longer an option.

# Currently disabled / not updated:

* UI-Pack
* Reverse
* Scroll (working, but not happy with interface - it's a property if people want to play, alias of scrollTop, there's also scrollLeft)
6 changes: 6 additions & 0 deletions grunt/aliases/default.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = function(grunt) {
grunt.registerTask("default", [
"ts",
"uglify"
]);
};
7 changes: 7 additions & 0 deletions grunt/aliases/major.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = function(grunt) {
grunt.registerTask("patch", [
"bump-only:patch",
"default",
"bump-commit"
]);
};
7 changes: 7 additions & 0 deletions grunt/aliases/minor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = function(grunt) {
grunt.registerTask("patch", [
"bump-only:patch",
"default",
"bump-commit"
]);
};
7 changes: 7 additions & 0 deletions grunt/aliases/patch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = function(grunt) {
grunt.registerTask("patch", [
"bump-only:patch",
"default",
"bump-commit"
]);
};
9 changes: 9 additions & 0 deletions grunt/options/bump.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
main: {
options: {
updateConfigs: ["pkg"],
commitFiles: ["package.json"],
pushTo: "origin"
}
}
};
3 changes: 3 additions & 0 deletions grunt/options/pkg.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = function(grunt) {
return grunt.file.readJSON("package.json");
};
17 changes: 17 additions & 0 deletions grunt/options/ts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
options: {
"fast": "never"
},
main: {
"tsconfig": true,
"files": {
"build/velocity.js": ["src/app.ts"]
}
},
test: {
"tsconfig": "test/tsconfig.json",
"files": {
"test/test.js": ["test/src/app.ts"]
}
}
};
53 changes: 53 additions & 0 deletions grunt/options/uglify.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
module.exports = {
main: {
options: {
sourceMap: {
root: "src/",
includeSources: true
},
sourceMapIn: "build/velocity.js.map",
compress: false,
mangle: false,
beautify: true,
output: {
comments: "all"
},
banner: `/*! VelocityJS.org (<%= pkg.version %>) (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define('Velocity', [], function() {
return (root['Velocity'] = factory());
});
} else if (typeof module === 'object' && module.exports) {
module.exports = factory();
} else {
root['Velocity'] = factory();
}
}(this, function() {
`,
footer: `
return VelocityFn;
}));
`
},
files: {
"velocity.js": ["build/velocity.js"]
}
},
min: {
options: {
sourceMap: false,
banner: `/*! <%= pkg.name %> v<%= pkg.version %> (<%= grunt.template.today('dddd dS mmmm yyyy, h:MM:ss TT') %>) */`,
compress: {
drop_console: true,
drop_debugger: true,
pure_getters: true,
unsafe: true
}
},
files: {
"velocity.min.js": ["velocity.js"],
"velocity.ui.min.js": ["velocity.ui.js"]
}
}
};
10 changes: 10 additions & 0 deletions grunt/options/watch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
main: {
files: ["index.d.ts", "src/**/*.ts"],
tasks: ["default"]
},
test: {
files: ["test/src/**/*.ts"],
tasks: ["ts:test"]
}
};
Loading

0 comments on commit b50e25e

Please sign in to comment.