├── examples
├── browserify
│ ├── Gulpfile.js
│ ├── app
│ │ ├── scripts
│ │ │ ├── pages
│ │ │ │ ├── lost
│ │ │ │ │ ├── template.html
│ │ │ │ │ └── controller.js
│ │ │ │ ├── greetings
│ │ │ │ │ ├── template.html
│ │ │ │ │ └── controller.js
│ │ │ │ ├── about
│ │ │ │ │ ├── template.html
│ │ │ │ │ └── controller.js
│ │ │ │ ├── pageId
│ │ │ │ │ ├── template.html
│ │ │ │ │ └── controller.js
│ │ │ │ └── home
│ │ │ │ │ ├── template.html
│ │ │ │ │ └── controller.js
│ │ │ ├── app.js
│ │ │ └── VuePage.js
│ │ ├── index.html
│ │ └── styles
│ │ │ └── main.styl
│ ├── gulp
│ │ ├── index.js
│ │ ├── tasks
│ │ │ ├── default.js
│ │ │ ├── clean.js
│ │ │ ├── copy.js
│ │ │ ├── jade.js
│ │ │ ├── scripts.js
│ │ │ ├── build.js
│ │ │ ├── sass.js
│ │ │ ├── stylus.js
│ │ │ ├── browserSync.js
│ │ │ ├── browserify.js
│ │ │ └── watch.js
│ │ └── util
│ │ │ └── handleErrors.js
│ ├── bower_components
│ │ └── gsap
│ │ │ ├── .gitignore
│ │ │ ├── bower.json
│ │ │ ├── src
│ │ │ ├── minified
│ │ │ │ ├── plugins
│ │ │ │ │ ├── EndArrayPlugin.min.js
│ │ │ │ │ ├── AttrPlugin.min.js
│ │ │ │ │ ├── RoundPropsPlugin.min.js
│ │ │ │ │ ├── DirectionalRotationPlugin.min.js
│ │ │ │ │ ├── CSSRulePlugin.min.js
│ │ │ │ │ ├── TextPlugin.min.js
│ │ │ │ │ ├── ColorPropsPlugin.min.js
│ │ │ │ │ ├── ScrollToPlugin.min.js
│ │ │ │ │ ├── EaselPlugin.min.js
│ │ │ │ │ ├── KineticPlugin.min.js
│ │ │ │ │ ├── RaphaelPlugin.min.js
│ │ │ │ │ └── BezierPlugin.min.js
│ │ │ │ ├── jquery.gsap.min.js
│ │ │ │ ├── easing
│ │ │ │ │ └── EasePack.min.js
│ │ │ │ ├── TimelineLite.min.js
│ │ │ │ └── TimelineMax.min.js
│ │ │ └── uncompressed
│ │ │ │ ├── plugins
│ │ │ │ ├── EndArrayPlugin.js
│ │ │ │ ├── AttrPlugin.js
│ │ │ │ ├── RoundPropsPlugin.js
│ │ │ │ ├── DirectionalRotationPlugin.js
│ │ │ │ ├── TextPlugin.js
│ │ │ │ ├── CSSRulePlugin.js
│ │ │ │ ├── ColorPropsPlugin.js
│ │ │ │ ├── ScrollToPlugin.js
│ │ │ │ ├── TEMPLATE_Plugin.js
│ │ │ │ ├── EaselPlugin.js
│ │ │ │ └── KineticPlugin.js
│ │ │ │ ├── jquery.gsap.js
│ │ │ │ └── easing
│ │ │ │ └── EasePack.js
│ │ │ ├── .bower.json
│ │ │ ├── package.json
│ │ │ └── README.md
│ ├── gulpConfig.json
│ ├── .server
│ │ ├── index.html
│ │ └── styles
│ │ │ └── main.css
│ └── package.json
└── webpack
│ ├── src
│ ├── components
│ │ ├── header
│ │ │ ├── template.html
│ │ │ ├── style.styl
│ │ │ └── index.js
│ │ └── pane
│ │ │ ├── template.html
│ │ │ ├── index.js
│ │ │ └── style.styl
│ ├── views
│ │ ├── b
│ │ │ ├── index.js
│ │ │ └── template.html
│ │ └── a
│ │ │ ├── template.html
│ │ │ └── index.js
│ ├── main.js
│ ├── main.styl
│ └── VuePage.js
│ ├── webpack.config.js
│ ├── index.html
│ ├── build
│ ├── 2.build.js
│ └── 1.build.js
│ ├── README.md
│ └── package.json
├── .gitignore
├── package.json
├── src
└── index.js
└── README.md
/examples/browserify/Gulpfile.js:
--------------------------------------------------------------------------------
1 | var gulp = require('./gulp');
--------------------------------------------------------------------------------
/examples/webpack/src/components/header/template.html:
--------------------------------------------------------------------------------
1 |
{{msg}}
--------------------------------------------------------------------------------
/examples/webpack/src/components/header/style.styl:
--------------------------------------------------------------------------------
1 | app-header
2 | color #bada55
--------------------------------------------------------------------------------
/examples/browserify/app/scripts/pages/lost/template.html:
--------------------------------------------------------------------------------
1 | What are you doing there?!
--------------------------------------------------------------------------------
/examples/browserify/app/scripts/pages/greetings/template.html:
--------------------------------------------------------------------------------
1 | Hello {{context.params.name}}
2 |
--------------------------------------------------------------------------------
/examples/browserify/gulp/index.js:
--------------------------------------------------------------------------------
1 | var requireDir = require('require-dir');
2 |
3 | requireDir('./tasks', {recurse: true});
--------------------------------------------------------------------------------
/examples/webpack/src/views/b/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | template: require('./template.html'),
3 | replace: true
4 | }
--------------------------------------------------------------------------------
/examples/webpack/src/views/b/template.html:
--------------------------------------------------------------------------------
1 |
2 |
This is page B.
3 |
Hello {{context.params.name}}!
4 |
--------------------------------------------------------------------------------
/examples/browserify/app/scripts/pages/about/template.html:
--------------------------------------------------------------------------------
1 | ABOUT
2 |
--------------------------------------------------------------------------------
/examples/webpack/src/components/pane/template.html:
--------------------------------------------------------------------------------
1 |
2 |
This is the {{side}} pane!
3 |
{{name}}
4 |
--------------------------------------------------------------------------------
/examples/browserify/app/scripts/pages/pageId/template.html:
--------------------------------------------------------------------------------
1 | Page with number
2 |
3 | Your on page {{context.params.id}} from {{context.pathname}}
4 |
--------------------------------------------------------------------------------
/examples/browserify/gulp/tasks/default.js:
--------------------------------------------------------------------------------
1 | var config = require('../../gulpConfig.json'),
2 | gulp = require('gulp');
3 |
4 | gulp.task('default', config.defaultTasks);
5 |
--------------------------------------------------------------------------------
/examples/webpack/src/components/header/index.js:
--------------------------------------------------------------------------------
1 | require('./style.styl')
2 |
3 | module.exports = {
4 | template: require('./template.html'),
5 | paramAttributes: ['msg']
6 | }
--------------------------------------------------------------------------------
/examples/browserify/gulp/tasks/clean.js:
--------------------------------------------------------------------------------
1 | var gulp = require('gulp'),
2 | del = require('del');
3 |
4 | gulp.task('clean', function (cb) {
5 | return del([global.use_folder], cb);
6 | });
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | **/.DS_Store
2 | **/node_modules
3 | example/browserify/bundle.js
4 | example/browserify/bower_components
5 | example/browserify/.server
6 | example/browserify/public
7 | example/webpack/build
8 |
--------------------------------------------------------------------------------
/examples/webpack/src/components/pane/index.js:
--------------------------------------------------------------------------------
1 | require('./style.styl')
2 |
3 | module.exports = {
4 | template: require('./template.html'),
5 | replace: true,
6 | paramAttributes: ['side', 'name']
7 | }
--------------------------------------------------------------------------------
/examples/browserify/app/scripts/pages/lost/controller.js:
--------------------------------------------------------------------------------
1 | var Vue = require('Vue');
2 | var template = require('./template.html');
3 |
4 | module.exports = Vue.component('lost', {
5 | template: template
6 | });
7 |
--------------------------------------------------------------------------------
/examples/webpack/src/components/pane/style.styl:
--------------------------------------------------------------------------------
1 | .pane
2 | display inline-block
3 | width 300px
4 | height 300px
5 | box-sizing border-box
6 | padding 15px 30px
7 | border 2px solid #f3f3f3
8 | margin 10px
--------------------------------------------------------------------------------
/examples/webpack/src/views/a/template.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/browserify/app/scripts/pages/home/template.html:
--------------------------------------------------------------------------------
1 | Welcome!
2 | Bienvenue!
3 |
4 |
5 |
--------------------------------------------------------------------------------
/examples/webpack/webpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | entry: "./src/main.js",
3 | output: {
4 | path: "./build",
5 | publicPath: "/build/",
6 | filename: "build.js"
7 | },
8 | module: {
9 | loaders: [
10 | { test: /\.styl$/, loader: "style!css!stylus" },
11 | { test: /\.html$/, loader: "html" }
12 | ]
13 | }
14 | }
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .AppleDouble
3 | .LSOverride
4 | Icon
5 |
6 | # Thumbnails
7 | ._*
8 |
9 | # Files that might appear on external disk
10 | .Spotlight-V100
11 | .Trashes
12 |
13 | # Windows image file caches
14 | Thumbs.db
15 | ehthumbs.db
16 |
17 | # Folder config file
18 | Desktop.ini
19 |
20 | # Recycle Bin used on file shares
21 | $RECYCLE.BIN/
--------------------------------------------------------------------------------
/examples/webpack/src/main.js:
--------------------------------------------------------------------------------
1 | require('./main.styl')
2 |
3 | var Vue = require('vue')
4 | var vuePage = require('./VuePage')
5 |
6 | window.onload = (function () {
7 | Vue.use(vuePage, {
8 | rootElement: '#app',
9 | keepAlive: true,
10 | cssTransitions: true,
11 | viewsPath: './views/',
12 | routes: {
13 | '/a': 'a',
14 | '/b/:name': 'b'
15 | }
16 | })
17 | })
--------------------------------------------------------------------------------
/examples/webpack/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Vue + Webpack
6 |
7 |
8 |
9 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/examples/webpack/src/main.styl:
--------------------------------------------------------------------------------
1 | html, body
2 | font-family Helvetica, Arial, sans-serif
3 |
4 | .view
5 | transition all .4s ease
6 | position absolute
7 | &-enter
8 | opacity 0
9 | -webkit-transform translate3d(100px, 0, 0)
10 | transform translate3d(100px, 0, 0)
11 | &-leave
12 | opacity 0
13 | -webkit-transform translate3d(-100px, 0, 0)
14 | transform translate3d(-100px, 0, 0)
--------------------------------------------------------------------------------
/examples/webpack/src/views/a/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | template: require('./template.html'),
3 | replace: true,
4 | data: function () {
5 | return {
6 | msg: 'This is page A.',
7 | leftName: 'Bruce Lee',
8 | rightName: 'Chuck Norris'
9 | }
10 | },
11 | components: {
12 | 'app-header': require('../../components/header'),
13 | 'app-pane': require('../../components/pane')
14 | }
15 | }
--------------------------------------------------------------------------------
/examples/browserify/gulp/util/handleErrors.js:
--------------------------------------------------------------------------------
1 | var notify = require('gulp-notify');
2 |
3 | module.exports = function () {
4 | var args = Array.prototype.slice.call(arguments);
5 |
6 | // Send error to notification center with gulp-notify
7 | notify.onError({
8 | title: 'Compile Error',
9 | message: '<%= error.message %>'
10 | }).apply(this, args);
11 |
12 | // Keep gulp from hanging on this task
13 | this.emit('end');
14 | };
15 |
--------------------------------------------------------------------------------
/examples/webpack/build/2.build.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([2],{
2 |
3 | /***/ 2:
4 | /***/ function(module, exports, __webpack_require__) {
5 |
6 | module.exports = {
7 | template: __webpack_require__(10),
8 | replace: true
9 | }
10 |
11 | /***/ },
12 |
13 | /***/ 10:
14 | /***/ function(module, exports, __webpack_require__) {
15 |
16 | module.exports = "\n
This is page B.
\n
I'm... a bit less complicated.
\n
";
17 |
18 | /***/ }
19 |
20 | });
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-page",
3 | "version": "1.0.1",
4 | "description": "A Vue.js plugin wrapping pagejs.",
5 | "keywords": [
6 | "vue",
7 | "routing",
8 | "pagejs"
9 | ],
10 | "license": "MIT",
11 | "devDependencies": {},
12 | "dependencies": {
13 | "page": "^1.4.1"
14 | },
15 | "repository": {
16 | "type": "git",
17 | "url": "git://github.com/AlexToudic/vue-page.git"
18 | },
19 | "main": "src/index.js"
20 | }
21 |
--------------------------------------------------------------------------------
/examples/webpack/README.md:
--------------------------------------------------------------------------------
1 | # Vue.js + Webpack example
2 |
3 | This example demonstrates using Webpack as the build tool for Vue.js apps, including:
4 |
5 | - Organize your app into views & components.
6 | - Directly `require()` CSS (Stylus) files and HTML templates via configured loaders.
7 | - Split your build into multiple chunks that are lazy-loaded.
8 |
9 | ## Setup
10 |
11 | ``` bash
12 | npm install
13 | npm run dev
14 | ```
15 |
16 | Then serve the folder with a static HTTP server, e.g. `python -m SimpleHTTPServer`. This is necessary to enable lazy-loading of modules.
--------------------------------------------------------------------------------
/examples/browserify/gulp/tasks/copy.js:
--------------------------------------------------------------------------------
1 | var config = require('../../gulpConfig.json'),
2 | gulp = require('gulp'),
3 | handleErrors = require('../util/handleErrors'),
4 | browserSync = require('browser-sync'),
5 | reload = browserSync.reload;
6 |
7 | gulp.task('copy', function () {
8 | gulp.src([config.folders.source+'/**/*{'+config.copy.extensions.join(',')+'}', config.folders.source+'/index.html'])
9 | .pipe(gulp.dest(use_folder))
10 | .on('error', handleErrors)
11 | .pipe(reload({
12 | stream: true
13 | }));
14 | });
15 |
--------------------------------------------------------------------------------
/examples/browserify/app/scripts/pages/about/controller.js:
--------------------------------------------------------------------------------
1 | var Vue = require('Vue');
2 | var template = require('./template.html');
3 |
4 | module.exports = Vue.component('about', {
5 | template: template,
6 | methods: {
7 | enter: function (cb) {
8 | TweenMax.staggerFromTo('span', 0.2, {
9 | y: -10,
10 | opacity: 0
11 | },{
12 | y: 0,
13 | opacity: 1
14 | }, 0.1, cb);
15 | },
16 | leave: function (cb) {
17 | TweenMax.staggerTo('span', 0.2, {
18 | y: 10,
19 | opacity: 0
20 | }, 0.1, cb);
21 | }
22 | }
23 | });
24 |
--------------------------------------------------------------------------------
/examples/browserify/gulp/tasks/jade.js:
--------------------------------------------------------------------------------
1 | var config = require('../../gulpConfig.json'),
2 | gulp = require('gulp'),
3 | jade = require('gulp-jade')
4 | handleErrors = require('../util/handleErrors'),
5 | browserSync = require('browser-sync'),
6 | reload = browserSync.reload;
7 |
8 | gulp.task('jade', function() {
9 | return gulp.src(config.folders.source + '/index.jade')
10 | .pipe(jade({
11 | locals: config.jade.locals
12 | }))
13 | .on('error', handleErrors)
14 | .pipe(gulp.dest(global.use_folder))
15 | .pipe(reload({
16 | stream: true
17 | }));
18 | });
19 |
--------------------------------------------------------------------------------
/examples/browserify/gulpConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "folders": {
3 | "source": "./app",
4 | "temp": "./.server",
5 | "build": "./public"
6 | },
7 | "defaultTasks": [
8 | "watch"
9 | ],
10 | "browsersync": {
11 | "server": {
12 | "pushRewrite": true
13 | }
14 | },
15 | "copy": {
16 | "extensions": [
17 | ".json",
18 | ".png",
19 | ".svg",
20 | ".jpg",
21 | ".mp3",
22 | ".wav"
23 | ]
24 | },
25 | "jade": {
26 | "locals": {}
27 | },
28 | "browserify": {
29 | "extensions": [
30 | ".js"
31 | ]
32 | },
33 | "stylus": {
34 | "nib": true
35 | },
36 | "sass": false
37 | }
--------------------------------------------------------------------------------
/examples/browserify/app/scripts/pages/pageId/controller.js:
--------------------------------------------------------------------------------
1 | var Vue = require('Vue');
2 | var template = require('./template.html');
3 |
4 | module.exports = Vue.component('pageId', {
5 | template: template,
6 | methods: {
7 | beforeEnter: function () {
8 | TweenMax.set(this.$el, {
9 | x: 40,
10 | opacity: 0
11 | });
12 | },
13 | enter: function (cb) {
14 | TweenMax.to(this.$el, 0.4, {
15 | x: 0,
16 | opacity: 1,
17 | onComplete: cb
18 | });
19 | },
20 | leave: function (cb) {
21 | TweenMax.to(this.$el, 0.4, {
22 | x: -40,
23 | opacity: 0,
24 | onComplete: cb
25 | });
26 | }
27 | }
28 | });
29 |
--------------------------------------------------------------------------------
/examples/browserify/app/scripts/pages/greetings/controller.js:
--------------------------------------------------------------------------------
1 | var Vue = require('Vue');
2 | var template = require('./template.html');
3 |
4 | module.exports = Vue.component('greetings', {
5 | template: template,
6 | methods: {
7 | beforeEnter: function () {
8 | TweenMax.set(this.$el, {
9 | y: -20,
10 | opacity: 0
11 | });
12 | },
13 | enter: function (cb) {
14 | TweenMax.to(this.$el, 0.4, {
15 | y: 0,
16 | opacity: 1,
17 | onComplete: cb
18 | });
19 | },
20 | leave: function (cb) {
21 | TweenMax.to(this.$el, 0.4, {
22 | y: 20,
23 | opacity: 0,
24 | onComplete: cb
25 | });
26 | }
27 | }
28 | });
29 |
--------------------------------------------------------------------------------
/examples/browserify/gulp/tasks/scripts.js:
--------------------------------------------------------------------------------
1 | var config = require('../../gulpConfig.json'),
2 | gulp = require('gulp'),
3 | uglify = require('gulp-uglify'),
4 | gulpif = require('gulp-if'),
5 | handleErrors = require('../util/handleErrors'),
6 | concat = require('gulp-concat'),
7 | browserSync = require('browser-sync'),
8 | reload = browserSync.reload;
9 |
10 | gulp.task('scripts', function () {
11 | gulp.src(config.folders.source+'scripts/**/*.js')
12 | .pipe(gulpif(global.devMode, uglify()))
13 | .on('error', handleErrors)
14 | .pipe(concat('app.js'))
15 | .pipe(gulp.dest(use_folder+'/scripts'))
16 | .pipe(reload({
17 | stream: true
18 | }));
19 | });
20 |
--------------------------------------------------------------------------------
/examples/browserify/app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Vue Router
5 |
6 |
7 |
8 |
9 |
10 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/examples/browserify/.server/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Vue Router
5 |
6 |
7 |
8 |
9 |
10 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/examples/browserify/gulp/tasks/build.js:
--------------------------------------------------------------------------------
1 | var config = require('../../gulpConfig.json'),
2 | gulp = require('gulp'),
3 | runSequence = require('run-sequence');
4 |
5 | gulp.task('build', function () {
6 | global.use_folder = config.folders.build;
7 | global.devMode = false;
8 |
9 | var tasks = [];
10 |
11 | if (config.copy) {
12 | tasks.push('copy');
13 | }
14 |
15 | if (config.browserify) {
16 | tasks.push('browserify');
17 | }
18 | else {
19 | tasks.push('scripts');
20 | }
21 |
22 | if (config.jade) {
23 | tasks.push('jade');
24 | }
25 |
26 | if (config.stylus) {
27 | tasks.push('stylus');
28 | }
29 |
30 | if (config.sass) {
31 | tasks.push('sass');
32 | }
33 |
34 | runSequence('clean', tasks);
35 | });
36 |
--------------------------------------------------------------------------------
/examples/browserify/app/scripts/app.js:
--------------------------------------------------------------------------------
1 | var Vue = require('Vue'),
2 | vuePage = require('./VuePage'),
3 | home = require('./pages/home/controller'),
4 | pageId = require('./pages/pageId/controller'),
5 | about = require('./pages/about/controller'),
6 | greetings = require('./pages/greetings/controller'),
7 | lost = require('./pages/lost/controller');
8 |
9 | Vue.use(vuePage, {
10 | rootElement: '#app',
11 | class: 'page',
12 | base: '/base',
13 | keepAlive: true,
14 | routes: {
15 | '/fr': {
16 | '/accueil': 'home',
17 | '/a-propos': 'about'
18 | },
19 | '/en': {
20 | '/home': 'home',
21 | '/about': 'about',
22 | },
23 | '/page/:id': 'pageId',
24 | '/hello/:name': 'greetings',
25 | '*': 'lost'
26 | },
27 | default: '/base/en/home'
28 | });
--------------------------------------------------------------------------------
/examples/browserify/gulp/tasks/sass.js:
--------------------------------------------------------------------------------
1 | var config = require('../../gulpConfig.json'),
2 | gulp = require('gulp'),
3 | stylus = require('gulp-stylus'),
4 | nib = require('nib'),
5 | handleErrors = require('../util/handleErrors'),
6 | browserSync = require('browser-sync'),
7 | reload = browserSync.reload;
8 |
9 | gulp.task('sass', function () {
10 | var options = {
11 | linenos: global.devMode,
12 | compress: !global.devMode
13 | };
14 |
15 | if (config.stylus.nib) {
16 | options.use = [nib()];
17 | }
18 |
19 | gulp.src(config.folders.source+'/styles/main.scss')
20 | .pipe(stylus(options))
21 | .on('error', handleErrors)
22 | .pipe(gulp.dest(global.use_folder+'/styles'))
23 | .pipe(reload({
24 | stream: true
25 | }));
26 | });
27 |
--------------------------------------------------------------------------------
/examples/browserify/gulp/tasks/stylus.js:
--------------------------------------------------------------------------------
1 | var config = require('../../gulpConfig.json'),
2 | gulp = require('gulp'),
3 | stylus = require('gulp-stylus'),
4 | nib = require('nib'),
5 | handleErrors = require('../util/handleErrors'),
6 | browserSync = require('browser-sync'),
7 | reload = browserSync.reload;
8 |
9 | gulp.task('stylus', function () {
10 | var options = {
11 | linenos: global.devMode,
12 | compress: !global.devMode
13 | };
14 |
15 | if (config.stylus.nib) {
16 | options.use = [nib()];
17 | }
18 |
19 | gulp.src(config.folders.source+'/styles/main.styl')
20 | .pipe(stylus(options))
21 | .on('error', handleErrors)
22 | .pipe(gulp.dest(global.use_folder+'/styles'))
23 | .pipe(reload({
24 | stream: true
25 | }));
26 | });
27 |
--------------------------------------------------------------------------------
/examples/browserify/gulp/tasks/browserSync.js:
--------------------------------------------------------------------------------
1 | var config = require('../../gulpConfig.json'),
2 | gulp = require('gulp'),
3 | browserSync = require('browser-sync'),
4 | modRewrite = require('connect-modrewrite');
5 |
6 | gulp.task('browser-sync', function () {
7 | var options;
8 |
9 | if (config.browsersync.server.pushRewrite) {
10 | options = {
11 | server: {
12 | baseDir: global.use_folder,
13 | middleware: [
14 | modRewrite([
15 | '^[^\\.]*$ /index.html [L]'
16 | ])
17 | ]
18 | }
19 | };
20 | }
21 | else if (config.browsersync.server.proxy) {
22 | options = {
23 | proxy: config.browsersync.server.proxy
24 | };
25 | }
26 | else {
27 | options = {
28 | server: {
29 | baseDir: global.use_folder
30 | }
31 | };
32 | }
33 |
34 | browserSync(options);
35 | });
36 |
--------------------------------------------------------------------------------
/examples/browserify/app/scripts/pages/home/controller.js:
--------------------------------------------------------------------------------
1 | var Vue = require('Vue'),
2 | TweenMax = require('TweenMax');
3 | var template = require('./template.html');
4 |
5 | module.exports = Vue.component('home', {
6 | template: template,
7 | events: {
8 | 'router:update': function () {
9 | console.log('url changed');
10 | }
11 | },
12 | methods: {
13 | helloVue: function () {
14 | Vue.page.show('/hello/VueJS');
15 | },
16 |
17 | beforeEnter: function () {
18 | TweenMax.set(this.$el, {
19 | x: -window.innerWidth/2
20 | });
21 | },
22 | enter: function (cb) {
23 | TweenMax.to(this.$el, 0.8, {
24 | x: 0,
25 | onComplete: cb
26 | });
27 | },
28 | leave: function (cb) {
29 | TweenMax.to(this.$el, 0.8, {
30 | x: -window.innerWidth/2,
31 | onComplete: cb
32 | });
33 | }
34 | }
35 | });
36 |
--------------------------------------------------------------------------------
/examples/webpack/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-webpack-example",
3 | "version": "1.0.0",
4 | "description": "Vue project example using Webpack as the bundler.",
5 | "main": "src/main.js",
6 | "dependencies": {
7 | "vue": "yyx990803/vue#next",
8 | "vue-page": "^0.1.2"
9 | },
10 | "devDependencies": {
11 | "css-loader": "^0.9.0",
12 | "html-loader": "^0.2.2",
13 | "style-loader": "^0.8.1",
14 | "stylus-loader": "^0.4.0",
15 | "webpack": "^1.4.4"
16 | },
17 | "scripts": {
18 | "dev": "webpack --watch",
19 | "build": "webpack -p"
20 | },
21 | "repository": {
22 | "type": "git",
23 | "url": "https://github.com/vuejs/vue-webpack-example"
24 | },
25 | "keywords": [
26 | "vue",
27 | "webpack"
28 | ],
29 | "author": "Evan You",
30 | "license": "MIT",
31 | "bugs": {
32 | "url": "https://github.com/vuejs/vue-webpack-example/issues"
33 | },
34 | "homepage": "https://github.com/vuejs/vue-webpack-example"
35 | }
36 |
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "gsap",
3 | "version": "1.14.2",
4 | "description": "GreenSock Animation Platform (GSAP) is a suite of high-performance JavaScript animation tools, including TweenLite, TweenMax, TimelineLite, TimelineMax, various easing equations (EasePack), plugins for things like animating along Bezier paths, tweening RaphaelJS or KineticJS objects, etc. and it also includes an optional jQuery plugin that hijacks the native jQuery.animate() method so that animations perform much better and additional properties can be tweened, like colors, transforms (2D and 3D), boxShadow, borderRadius, clip, and lots more. GSAP has no dependencies on jQuery and it can animate ANY numeric property of ANY object. See http://www.greensock.com/gsap-js/ for details.",
5 | "author": {
6 | "name": "Jack Doyle",
7 | "url": "http://www.greensock.com/gsap-js/"
8 | },
9 | "main": "./src/uncompressed/TweenMax.js",
10 | "dependencies": {
11 |
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/minified/plugins/EndArrayPlugin.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: 0.1.2
3 | * DATE: 2014-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | */
12 | var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine.plugin({propName:"endArray",API:2,version:"0.1.2",init:function(t,e){var i,r,s=e.length,n=this.a=[];if(this.target=t,this._round=!1,!s)return!1;for(;--s>-1;)i=t[s],r=e[s],i!==r&&n.push({i:s,s:i,c:r-i});return!0},round:function(t){"endArray"in t&&(this._round=!0)},set:function(t){var e,i,r=this.target,s=this.a,n=s.length;if(this._round)for(;--n>-1;)e=s[n],r[e.i]=Math.round(e.s+e.c*t);else for(;--n>-1;)e=s[n],i=e.s+e.c*t,r[e.i]=1e-6>i&&i>-1e-6?0:i}})}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()();
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/minified/plugins/AttrPlugin.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: 0.3.3
3 | * DATE: 2014-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | */
12 | var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine.plugin({propName:"attr",API:2,version:"0.3.3",init:function(t,e){var i,r,s;if("function"!=typeof t.setAttribute)return!1;this._target=t,this._proxy={},this._start={},this._end={};for(i in e)this._start[i]=this._proxy[i]=r=t.getAttribute(i),s=this._addTween(this._proxy,i,parseFloat(r),e[i],i),this._end[i]=s?s.s+s.c:e[i],this._overwriteProps.push(i);return!0},set:function(t){this._super.setRatio.call(this,t);for(var e,i=this._overwriteProps,r=i.length,s=1===t?this._end:t?this._proxy:this._start;--r>-1;)e=i[r],this._target.setAttribute(e,s[e]+"")}})}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()();
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "gsap",
3 | "version": "1.14.2",
4 | "description": "GreenSock Animation Platform (GSAP) is a suite of high-performance JavaScript animation tools, including TweenLite, TweenMax, TimelineLite, TimelineMax, various easing equations (EasePack), plugins for things like animating along Bezier paths, tweening RaphaelJS or KineticJS objects, etc. and it also includes an optional jQuery plugin that hijacks the native jQuery.animate() method so that animations perform much better and additional properties can be tweened, like colors, transforms (2D and 3D), boxShadow, borderRadius, clip, and lots more. GSAP has no dependencies on jQuery and it can animate ANY numeric property of ANY object. See http://www.greensock.com/gsap-js/ for details.",
5 | "author": {
6 | "name": "Jack Doyle",
7 | "url": "http://www.greensock.com/gsap-js/"
8 | },
9 | "main": "./src/uncompressed/TweenMax.js",
10 | "dependencies": {},
11 | "homepage": "https://github.com/greensock/GreenSock-JS",
12 | "_release": "1.14.2",
13 | "_resolution": {
14 | "type": "version",
15 | "tag": "1.14.2",
16 | "commit": "2c88aaddeaed0c50b89e9885346bdb0ef4e8c364"
17 | },
18 | "_source": "git://github.com/greensock/GreenSock-JS.git",
19 | "_target": "~1.14.2",
20 | "_originalSource": "gsap",
21 | "_direct": true
22 | }
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/minified/plugins/RoundPropsPlugin.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: beta 1.4.1
3 | * DATE: 2014-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | **/
12 | var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var t=_gsScope._gsDefine.plugin({propName:"roundProps",version:"1.4.1",priority:-1,API:2,init:function(t,e,i){return this._tween=i,!0}}),e=t.prototype;e._onInitAllProps=function(){for(var t,e,i,r=this._tween,s=r.vars.roundProps instanceof Array?r.vars.roundProps:r.vars.roundProps.split(","),n=s.length,a={},o=r._propLookup.roundProps;--n>-1;)a[s[n]]=1;for(n=s.length;--n>-1;)for(t=s[n],e=r._firstPT;e;)i=e._next,e.pg?e.t._roundProps(a,!0):e.n===t&&(this._add(e.t,t,e.s,e.c),i&&(i._prev=e._prev),e._prev?e._prev._next=i:r._firstPT===e&&(r._firstPT=i),e._next=e._prev=null,r._propLookup[t]=o),e=i;return!1},e._add=function(t,e,i,r){this._addTween(t,e,i,i+r,e,!0),this._overwriteProps.push(e)}}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()();
--------------------------------------------------------------------------------
/examples/browserify/gulp/tasks/browserify.js:
--------------------------------------------------------------------------------
1 | var config = require('../../gulpConfig.json'),
2 | gulp = require('gulp'),
3 | source = require('vinyl-source-stream'),
4 | gulpif = require('gulp-if'),
5 | browserify = require('browserify'),
6 | watchify = require('watchify'),
7 | jadeify = require('jadeify'),
8 | stringify = require('stringify'),
9 | uglify = require('gulp-uglify'),
10 | handleErrors = require('../util/handleErrors'),
11 | browserSync = require('browser-sync'),
12 | reload = browserSync.reload,
13 | handleErrors = require('../util/handleErrors');
14 |
15 | gulp.task('browserify', function() {
16 | var bundle, bundler;
17 |
18 | bundler = browserify({
19 | cache: {},
20 | packageCache: {},
21 | fullPaths: true,
22 | extensions: config.browserify.extensions,
23 | debug: global.devMode
24 | })
25 | .transform([stringify(['.html']), jadeify, 'browserify-shim'])
26 | .add(config.folders.source+'/scripts/app.js');
27 |
28 | bundle = function() {
29 | return bundler
30 | .bundle()
31 | .on('error', handleErrors)
32 | .pipe(source('bundle.js'))
33 | .pipe(gulp.dest(global.use_folder+'/scripts'))
34 | .pipe(reload({
35 | stream: true
36 | }));
37 | };
38 |
39 | if (global.devMode) {
40 | bundler = watchify(bundler);
41 | bundler.on('update', bundle);
42 | }
43 |
44 | return bundle();
45 | });
46 |
--------------------------------------------------------------------------------
/examples/browserify/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-page-test",
3 | "devDependencies": {
4 | "browser-sync": "^1.7.0",
5 | "browserify": "^6.3.2",
6 | "browserify-shim": "^3.8.0",
7 | "connect-modrewrite": "^0.7.9",
8 | "del": "^0.1.3",
9 | "gulp": "^3.8.10",
10 | "gulp-concat": "^2.4.2",
11 | "gulp-if": "^1.2.5",
12 | "gulp-jade": "^0.10.0",
13 | "gulp-notify": "^2.0.1",
14 | "gulp-streamify": "0.0.5",
15 | "gulp-stylus": "^1.3.4",
16 | "gulp-uglify": "^1.0.1",
17 | "gulp-watch": "^2.0.0",
18 | "jade": "^1.7.0",
19 | "jadeify": "^3.0.0",
20 | "jsdom": "^1.0.0",
21 | "nib": "^1.0.4",
22 | "require-dir": "^0.1.0",
23 | "run-sequence": "^1.0.2",
24 | "streamify": "^0.2.4",
25 | "stringify": "^3.0.0",
26 | "uglify": "^0.1.0",
27 | "vinyl-source-stream": "^1.0.0",
28 | "watchify": "^2.1.1"
29 | },
30 | "dependencies": {
31 | "vue": "^0.11.0"
32 | },
33 | "browserify-shim": {
34 | "underscore": "_",
35 | "jquery": "$",
36 | "TweenMax": "TweenMax",
37 | "pixi": "PIXI",
38 | "TimelineMax": "TimelineMax",
39 | "dat.gui": "dat"
40 | },
41 | "browser": {
42 | "underscore": "./bower_components/underscore/underscore.js",
43 | "jquery": "./bower_components/jquery/dist/jquery.js",
44 | "TweenMax": "./bower_components/gsap/src/uncompressed/TweenMax.js",
45 | "pixi": "./bower_components/pixi/bin/pixi.js",
46 | "TimelineMax": "./bower_components/gsap/src/uncompressed/TimelineMax.js",
47 | "dat.gui": "./bower_components/dat.gui/dat.gui.js"
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "gsap",
3 | "filename": "TweenMax.min.js",
4 | "version": "1.14.2",
5 | "description": "GreenSock Animation Platform (GSAP) is a suite of tools for scripted animation, including TweenLite, TweenMax, TimelineLite, TimelineMax, various easing equations (EasePack), plugins for things like animating along Bezier paths, tweening RaphaelJS objects, etc. and it also includes a jQuery plugin that hijacks the native jQuery.animate() method so that animations perform much better and additional properties can be tweened, like colors, transforms (2D and 3D), boxShadow, borderRadius, clip, and lots more. GSAP has no dependencies on jQuery and it can animate ANY numeric property of ANY object.",
6 | "homepage": "http://www.greensock.com/gsap-js/",
7 | "main": "./src/uncompressed/TweenMax.js",
8 | "keywords": [
9 | "animation",
10 | "TweenLite",
11 | "TweenMax",
12 | "TimelineLite",
13 | "TimelineMax",
14 | "GSAP",
15 | "GreenSock",
16 | "easing",
17 | "EasePack",
18 | "jQuery",
19 | "jquery.gsap.js",
20 | "Bezier",
21 | "3D",
22 | "2D",
23 | "transform",
24 | "tweening"
25 | ],
26 | "maintainers": [
27 | {
28 | "name": "Jack Doyle",
29 | "email": "jack@greensock.com",
30 | "web": "http://www.greensock.com"
31 | }
32 | ],
33 | "bugs": {
34 | "url": "http://greensock.com/forums/"
35 | },
36 | "repositories": [
37 | {
38 | "type": "git",
39 | "url": "https://github.com/greensock/GreenSock-JS"
40 | }
41 | ]
42 |
43 | }
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/minified/plugins/DirectionalRotationPlugin.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: beta 0.2.1
3 | * DATE: 2014-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | **/
12 | var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine.plugin({propName:"directionalRotation",version:"0.2.1",API:2,init:function(t,e){"object"!=typeof e&&(e={rotation:e}),this.finals={};var i,r,s,n,a,o,l=e.useRadians===!0?2*Math.PI:360,h=1e-6;for(i in e)"useRadians"!==i&&(o=(e[i]+"").split("_"),r=o[0],s=parseFloat("function"!=typeof t[i]?t[i]:t[i.indexOf("set")||"function"!=typeof t["get"+i.substr(3)]?i:"get"+i.substr(3)]()),n=this.finals[i]="string"==typeof r&&"="===r.charAt(1)?s+parseInt(r.charAt(0)+"1",10)*Number(r.substr(2)):Number(r)||0,a=n-s,o.length&&(r=o.join("_"),-1!==r.indexOf("short")&&(a%=l,a!==a%(l/2)&&(a=0>a?a+l:a-l)),-1!==r.indexOf("_cw")&&0>a?a=(a+9999999999*l)%l-(0|a/l)*l:-1!==r.indexOf("ccw")&&a>0&&(a=(a-9999999999*l)%l-(0|a/l)*l)),(a>h||-h>a)&&(this._addTween(t,i,s,s+a,i),this._overwriteProps.push(i)));return!0},set:function(t){var e;if(1!==t)this._super.setRatio.call(this,t);else for(e=this._firstPT;e;)e.f?e.t[e.p](this.finals[e.p]):e.t[e.p]=this.finals[e.p],e=e._next}})._autoCSS=!0}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()();
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/minified/plugins/CSSRulePlugin.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: beta 0.6.2
3 | * DATE: 2014-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | */
12 | var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("plugins.CSSRulePlugin",["plugins.TweenPlugin","TweenLite","plugins.CSSPlugin"],function(t,e,i){var r=function(){t.call(this,"cssRule"),this._overwriteProps.length=0},s=window.document,n=i.prototype.setRatio,a=r.prototype=new i;return a._propName="cssRule",a.constructor=r,r.version="0.6.2",r.API=2,r.getRule=function(t){var e,i,r,n,a=s.all?"rules":"cssRules",o=s.styleSheets,l=o.length,h=":"===t.charAt(0);for(t=(h?"":",")+t.toLowerCase()+",",h&&(n=[]);--l>-1;){try{i=o[l][a]}catch(u){console.log(u);continue}for(e=i.length;--e>-1;)if(r=i[e],r.selectorText&&-1!==(","+r.selectorText.split("::").join(":").toLowerCase()+",").indexOf(t)){if(!h)return r.style;n.push(r.style)}}return n},a._onInitTween=function(t,e,r){if(void 0===t.cssText)return!1;var n=t._gsProxy=t._gsProxy||s.createElement("div");return this._ss=t,this._proxy=n.style,n.style.cssText=t.cssText,i.prototype._onInitTween.call(this,n,e,r),!0},a.setRatio=function(t){n.call(this,t),this._ss.cssText=this._proxy.cssText},t.activate([r]),r},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()();
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/README.md:
--------------------------------------------------------------------------------
1 | # GSAP (GreenSock Animation Platform)
2 |
3 | #### Professional-Grade HTML5 Animation
4 |
5 | GSAP is a suite of tools for scripted, high-performance HTML5 animations that work in all major browsers. No other library delivers such advanced sequencing, API efficiency, and tight control. Stop wrestling with cumbersome CSS animations, stuttery jQuery.animate() calls, or a system that limits your creativity. Use animation to tell a story in a rich way rather than settling for a few fades and slides.
6 |
7 | This is the public repository for GreenSock's JavaScript tools like GSAP and Draggable. "GSAP" describes all of the animation-related tools which include TweenLite, TweenMax, TimelineLite, TimelineMax, various plugins (like CSSPlugin for animating CSS properties of DOM elements), extra easing functions, etc.
8 |
9 | ### Resources
10 |
11 | * GSAP home page
12 | * Getting started guide
13 | * Why GSAP? (a practical guide for developers)
14 | * Jump Start (visually demonstrates the basic concepts)
15 | * Full documentation
16 | * Draggable demo
17 | * jQuery plugin
18 |
19 | Copyright (c) 2014, GreenSock. All rights reserved. This work is subject to the terms of use or for Club GreenSock members, the software agreement that was issued with the membership.
--------------------------------------------------------------------------------
/examples/browserify/gulp/tasks/watch.js:
--------------------------------------------------------------------------------
1 | var config = require('../../gulpConfig.json'),
2 | gulp = require('gulp'),
3 | watch = require('gulp-watch'),
4 | runSequence = require('run-sequence');
5 |
6 | gulp.task('watch', function () {
7 | global.use_folder = config.folders.temp;
8 | global.devMode = true;
9 |
10 | var tasks = [];
11 |
12 | if (config.copy) {
13 | tasks.push('copy');
14 | }
15 |
16 | if (config.browserify) {
17 | tasks.push('browserify');
18 | }
19 | else {
20 | tasks.push('scripts');
21 | }
22 |
23 | if (config.jade) {
24 | tasks.push('jade');
25 | }
26 |
27 | if (config.stylus) {
28 | tasks.push('stylus');
29 | }
30 |
31 | if (config.sass) {
32 | tasks.push('sass');
33 | }
34 |
35 | if (config.browsersync) {
36 | runSequence('clean', tasks, 'browser-sync');
37 | }
38 | else {
39 | runSequence('clean', tasks);
40 | }
41 |
42 | watch([config.folders.source+'/assets/**/*', config.folders.source+'/index.html'], function (files, cb) {
43 | gulp.start('copy', cb);
44 | });
45 |
46 | if (config.copy) {
47 | watch([config.folders.source+'/**/*{'+config.copy.extensions.join(',')+'}', config.folders.source+'/index.html'], function (files, cb) {
48 | gulp.start('copy', cb);
49 | });
50 | }
51 |
52 | if (!config.browserify) {
53 | watch(config.folders.source+'/scripts/**/*.js', function (files, cb) {
54 | gulp.start('scripts', cb);
55 | });
56 | }
57 |
58 | if (config.jade) {
59 | watch(config.folders.source+'/**/*.jade', function (files, cb) {
60 | gulp.start('jade', cb);
61 | });
62 | }
63 |
64 | if (config.stylus) {
65 | watch(config.folders.source+'/styles/**/*.styl', function (files, cb) {
66 | gulp.start('stylus', cb);
67 | });
68 | }
69 |
70 | if (config.sass) {
71 | watch(config.folders.source+'/styles/**/*.scss', function (files, cb) {
72 | gulp.start('sass', cb);
73 | });
74 | }
75 | });
76 |
--------------------------------------------------------------------------------
/examples/browserify/app/styles/main.styl:
--------------------------------------------------------------------------------
1 | @import 'nib'
2 |
3 | global-reset()
4 |
5 | $baseColor = #0099FF
6 | $darkerColor = #1A4C80
7 |
8 | *
9 | box-sizing border-box
10 |
11 | a
12 | text-decoration none
13 |
14 | button
15 | z-index 1
16 |
17 | position relative
18 |
19 | padding 15px
20 | margin-top 15px
21 |
22 | font-size 14px
23 | color white
24 |
25 | text-transform uppercase
26 |
27 | background none
28 | border 1px solid white
29 |
30 | border-radius 0
31 |
32 | cursor pointer
33 |
34 | transition color 0.3s
35 |
36 | &:after
37 | content ''
38 |
39 | z-index -1
40 |
41 | absolute top 0 left 0
42 |
43 | width 100%
44 | height 100%
45 |
46 | background white
47 |
48 | transform-origin 0 0
49 | transform scaleY(0)
50 |
51 | transition transform 0.3s
52 |
53 | &:hover
54 | color $baseColor
55 |
56 | &:after
57 | transform scaleY(1)
58 |
59 | h1
60 | font-size 20px
61 | font-weight 700
62 |
63 | text-transform uppercase
64 |
65 | html
66 | font-family 'Roboto', sans-serif
67 |
68 | html,
69 | body
70 | width 100%
71 | height 100%
72 |
73 | body
74 | color white
75 |
76 | background $baseColor
77 |
78 | .container
79 | margin 0 auto
80 | padding 20px
81 |
82 | max-width 1200px
83 |
84 | nav
85 | width 100%
86 |
87 | a
88 | display inline-block
89 | position relative
90 |
91 | margin-right 20px
92 | padding-top 10px
93 | padding-bottom 6px
94 |
95 | color white
96 |
97 | text-align center
98 |
99 | &:after
100 | content ''
101 |
102 | display block
103 | absolute bottom 0 left 0
104 |
105 | width 100%
106 | height 2px
107 |
108 | background white
109 |
110 | transform-origin 0
111 | transform scaleX(0)
112 |
113 | transition transform 0.3s
114 |
115 | &:hover
116 | &:after
117 | transform scaleX(1)
118 |
119 | #app
120 | position relative
121 |
122 | .page
123 | absolute top 0 left 0
124 |
125 | padding-top 20px
126 |
127 | span
128 | display inline-block
129 |
130 | opacity 0
131 |
132 | p
133 | margin 30px 20px
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/uncompressed/plugins/EndArrayPlugin.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: 0.1.2
3 | * DATE: 2014-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | */
12 | var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node
13 | (_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() {
14 |
15 | "use strict";
16 |
17 | _gsScope._gsDefine.plugin({
18 | propName: "endArray",
19 | API: 2,
20 | version: "0.1.2",
21 |
22 | //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
23 | init: function(target, value, tween) {
24 | var i = value.length,
25 | a = this.a = [],
26 | start, end;
27 | this.target = target;
28 | this._round = false;
29 | if (!i) {
30 | return false;
31 | }
32 | while (--i > -1) {
33 | start = target[i];
34 | end = value[i];
35 | if (start !== end) {
36 | a.push({i:i, s:start, c:end - start});
37 | }
38 | }
39 | return true;
40 | },
41 |
42 | round: function(lookup) {
43 | if ("endArray" in lookup) {
44 | this._round = true;
45 | }
46 | },
47 |
48 | //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)
49 | set: function(ratio) {
50 | var target = this.target,
51 | a = this.a,
52 | i = a.length,
53 | e, val;
54 | if (this._round) {
55 | while (--i > -1) {
56 | e = a[i];
57 | target[e.i] = Math.round(e.s + e.c * ratio);
58 | }
59 | } else {
60 | while (--i > -1) {
61 | e = a[i];
62 | val = e.s + e.c * ratio;
63 | target[e.i] = (val < 0.000001 && val > -0.000001) ? 0 : val;
64 | }
65 | }
66 | }
67 |
68 | });
69 |
70 | }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/minified/plugins/TextPlugin.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: 0.5.1
3 | * DATE: 2014-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | */
12 | var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var t=function(e){var i=e.nodeType,s="";if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)s+=t(e)}else if(3===i||4===i)return e.nodeValue;return s},e=_gsScope._gsDefine.plugin({propName:"text",API:2,version:"0.5.1",init:function(e,i,s){var r,n;if(!("innerHTML"in e))return!1;if(this._target=e,"object"!=typeof i&&(i={value:i}),void 0===i.value)return this._text=this._original=[""],!0;for(this._delimiter=i.delimiter||"",this._original=t(e).replace(/\s+/g," ").split(this._delimiter),this._text=i.value.replace(/\s+/g," ").split(this._delimiter),this._runBackwards=s.vars.runBackwards===!0,this._runBackwards&&(r=this._original,this._original=this._text,this._text=r),"string"==typeof i.newClass&&(this._newClass=i.newClass,this._hasClass=!0),"string"==typeof i.oldClass&&(this._oldClass=i.oldClass,this._hasClass=!0),r=this._original.length-this._text.length,n=0>r?this._original:this._text,this._fillChar=i.fillChar||(i.padSpace?" ":""),0>r&&(r=-r);--r>-1;)n.push(this._fillChar);return!0},set:function(t){t>1?t=1:0>t&&(t=0),this._runBackwards&&(t=1-t);var e,i,s,r=this._text.length,n=0|t*r+.5;this._hasClass?(e=this._newClass&&0!==n,i=this._oldClass&&n!==r,s=(e?"":"")+this._text.slice(0,n).join(this._delimiter)+(e?"":"")+(i?"":"")+this._delimiter+this._original.slice(n).join(this._delimiter)+(i?"":"")):s=this._text.slice(0,n).join(this._delimiter)+this._delimiter+this._original.slice(n).join(this._delimiter),this._target.innerHTML=" "===this._fillChar&&-1!==s.indexOf(" ")?s.split(" ").join(" "):s}}),i=e.prototype;i._newClass=i._oldClass=i._delimiter=""}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()();
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/uncompressed/plugins/AttrPlugin.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: 0.3.3
3 | * DATE: 2014-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | */
12 | var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node
13 | (_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() {
14 |
15 | "use strict";
16 |
17 | _gsScope._gsDefine.plugin({
18 | propName: "attr",
19 | API: 2,
20 | version: "0.3.3",
21 |
22 | //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
23 | init: function(target, value, tween) {
24 | var p, start, end;
25 | if (typeof(target.setAttribute) !== "function") {
26 | return false;
27 | }
28 | this._target = target;
29 | this._proxy = {};
30 | this._start = {}; // we record start and end values exactly as they are in case they're strings (not numbers) - we need to be able to revert to them cleanly.
31 | this._end = {};
32 | for (p in value) {
33 | this._start[p] = this._proxy[p] = start = target.getAttribute(p);
34 | end = this._addTween(this._proxy, p, parseFloat(start), value[p], p);
35 | this._end[p] = end ? end.s + end.c : value[p];
36 | this._overwriteProps.push(p);
37 | }
38 | return true;
39 | },
40 |
41 | //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)
42 | set: function(ratio) {
43 | this._super.setRatio.call(this, ratio);
44 | var props = this._overwriteProps,
45 | i = props.length,
46 | lookup = (ratio === 1) ? this._end : ratio ? this._proxy : this._start,
47 | p;
48 | while (--i > -1) {
49 | p = props[i];
50 | this._target.setAttribute(p, lookup[p] + "");
51 | }
52 | }
53 |
54 | });
55 |
56 | }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/minified/plugins/ColorPropsPlugin.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: beta 1.2.1
3 | * DATE: 2013-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | **/
12 | var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var t=/(\d|\.)+/g,e={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},i=function(t,e,i){return t=0>t?t+1:t>1?t-1:t,0|255*(1>6*t?e+6*(i-e)*t:.5>t?i:2>3*t?e+6*(i-e)*(2/3-t):e)+.5},s=function(s){if(""===s||null==s||"none"===s)return e.transparent;if(e[s])return e[s];if("number"==typeof s)return[s>>16,255&s>>8,255&s];if("#"===s.charAt(0))return 4===s.length&&(s="#"+s.charAt(1)+s.charAt(1)+s.charAt(2)+s.charAt(2)+s.charAt(3)+s.charAt(3)),s=parseInt(s.substr(1),16),[s>>16,255&s>>8,255&s];if("hsl"===s.substr(0,3)){s=s.match(t);var r=Number(s[0])%360/360,n=Number(s[1])/100,a=Number(s[2])/100,o=.5>=a?a*(n+1):a+n-a*n,h=2*a-o;return s.length>3&&(s[3]=Number(s[3])),s[0]=i(r+1/3,h,o),s[1]=i(r,h,o),s[2]=i(r-1/3,h,o),s}return s.match(t)||e.transparent};_gsScope._gsDefine.plugin({propName:"colorProps",version:"1.2.1",priority:-1,API:2,init:function(t,e){this._target=t;var i,r,n,a;for(i in e)n=s(e[i]),this._firstPT=a={_next:this._firstPT,p:i,f:"function"==typeof t[i],n:i,r:!1},r=s(a.f?t[i.indexOf("set")||"function"!=typeof t["get"+i.substr(3)]?i:"get"+i.substr(3)]():t[i]),a.s=Number(r[0]),a.c=Number(n[0])-a.s,a.gs=Number(r[1]),a.gc=Number(n[1])-a.gs,a.bs=Number(r[2]),a.bc=Number(n[2])-a.bs,(a.rgba=r.length>3||n.length>3)&&(a.as=4>r.length?1:Number(r[3]),a.ac=(4>n.length?1:Number(n[3]))-a.as),a._next&&(a._next._prev=a);return!0},set:function(t){for(var e,i=this._firstPT;i;)e=(i.rgba?"rgba(":"rgb(")+(i.s+t*i.c>>0)+", "+(i.gs+t*i.gc>>0)+", "+(i.bs+t*i.bc>>0)+(i.rgba?", "+(i.as+t*i.ac):"")+")",i.f?this._target[i.p](e):this._target[i.p]=e,i=i._next}})}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()();
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/minified/plugins/ScrollToPlugin.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: 1.7.4
3 | * DATE: 2014-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | **/
12 | var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var t=document.documentElement,e=window,i=function(i,r){var s="x"===r?"Width":"Height",n="scroll"+s,o="client"+s,a=document.body;return i===e||i===t||i===a?Math.max(t[n],a[n])-(e["inner"+s]||Math.max(t[o],a[o])):i[n]-i["offset"+s]},r=_gsScope._gsDefine.plugin({propName:"scrollTo",API:2,version:"1.7.4",init:function(t,r,s){return this._wdw=t===e,this._target=t,this._tween=s,"object"!=typeof r&&(r={y:r}),this.vars=r,this._autoKill=r.autoKill!==!1,this.x=this.xPrev=this.getX(),this.y=this.yPrev=this.getY(),null!=r.x?(this._addTween(this,"x",this.x,"max"===r.x?i(t,"x"):r.x,"scrollTo_x",!0),this._overwriteProps.push("scrollTo_x")):this.skipX=!0,null!=r.y?(this._addTween(this,"y",this.y,"max"===r.y?i(t,"y"):r.y,"scrollTo_y",!0),this._overwriteProps.push("scrollTo_y")):this.skipY=!0,!0},set:function(t){this._super.setRatio.call(this,t);var r=this._wdw||!this.skipX?this.getX():this.xPrev,s=this._wdw||!this.skipY?this.getY():this.yPrev,n=s-this.yPrev,o=r-this.xPrev;this._autoKill&&(!this.skipX&&(o>7||-7>o)&&i(this._target,"x")>r&&(this.skipX=!0),!this.skipY&&(n>7||-7>n)&&i(this._target,"y")>s&&(this.skipY=!0),this.skipX&&this.skipY&&(this._tween.kill(),this.vars.onAutoKill&&this.vars.onAutoKill.apply(this.vars.onAutoKillScope||this._tween,this.vars.onAutoKillParams||[]))),this._wdw?e.scrollTo(this.skipX?r:this.x,this.skipY?s:this.y):(this.skipY||(this._target.scrollTop=this.y),this.skipX||(this._target.scrollLeft=this.x)),this.xPrev=this.x,this.yPrev=this.y}}),s=r.prototype;r.max=i,s.getX=function(){return this._wdw?null!=e.pageXOffset?e.pageXOffset:null!=t.scrollLeft?t.scrollLeft:document.body.scrollLeft:this._target.scrollLeft},s.getY=function(){return this._wdw?null!=e.pageYOffset?e.pageYOffset:null!=t.scrollTop?t.scrollTop:document.body.scrollTop:this._target.scrollTop},s._kill=function(t){return t.scrollTo_x&&(this.skipX=!0),t.scrollTo_y&&(this.skipY=!0),this._super._kill.call(this,t)}}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()();
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/uncompressed/plugins/RoundPropsPlugin.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: beta 1.4.1
3 | * DATE: 2014-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | **/
12 | var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node
13 | (_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() {
14 |
15 | "use strict";
16 |
17 | var RoundPropsPlugin = _gsScope._gsDefine.plugin({
18 | propName: "roundProps",
19 | version: "1.4.1",
20 | priority: -1,
21 | API: 2,
22 |
23 | //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
24 | init: function(target, value, tween) {
25 | this._tween = tween;
26 | return true;
27 | }
28 |
29 | }),
30 | p = RoundPropsPlugin.prototype;
31 |
32 | p._onInitAllProps = function() {
33 | var tween = this._tween,
34 | rp = (tween.vars.roundProps instanceof Array) ? tween.vars.roundProps : tween.vars.roundProps.split(","),
35 | i = rp.length,
36 | lookup = {},
37 | rpt = tween._propLookup.roundProps,
38 | prop, pt, next;
39 | while (--i > -1) {
40 | lookup[rp[i]] = 1;
41 | }
42 | i = rp.length;
43 | while (--i > -1) {
44 | prop = rp[i];
45 | pt = tween._firstPT;
46 | while (pt) {
47 | next = pt._next; //record here, because it may get removed
48 | if (pt.pg) {
49 | pt.t._roundProps(lookup, true);
50 | } else if (pt.n === prop) {
51 | this._add(pt.t, prop, pt.s, pt.c);
52 | //remove from linked list
53 | if (next) {
54 | next._prev = pt._prev;
55 | }
56 | if (pt._prev) {
57 | pt._prev._next = next;
58 | } else if (tween._firstPT === pt) {
59 | tween._firstPT = next;
60 | }
61 | pt._next = pt._prev = null;
62 | tween._propLookup[prop] = rpt;
63 | }
64 | pt = next;
65 | }
66 | }
67 | return false;
68 | };
69 |
70 | p._add = function(target, p, s, c) {
71 | this._addTween(target, p, s, s + c, p, true);
72 | this._overwriteProps.push(p);
73 | };
74 |
75 | }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/minified/jquery.gsap.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: 0.1.9
3 | * DATE: 2014-07-22
4 | * UPDATES AND DOCS AT: http://www.greensock.com/jquery-gsap-plugin/
5 | *
6 | * Requires TweenLite version 1.8.0 or higher and CSSPlugin.
7 | *
8 | * @license Copyright (c) 2014, GreenSock. All rights reserved.
9 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
10 | * Club GreenSock members, the software agreement that was issued with your membership.
11 | *
12 | * @author: Jack Doyle, jack@greensock.com
13 | */
14 | (function(t){"use strict";var e,i,s,r=t.fn.animate,n=t.fn.stop,a=!0,o=function(t){var e,i={};for(e in t)i[e]=t[e];return i},h={overwrite:1,delay:1,useFrames:1,runBackwards:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,autoCSS:1},l=function(t,e){for(var i in h)h[i]&&void 0!==t[i]&&(e[i]=t[i])},_=function(t){return function(e){return t.getRatio(e)}},u={},c=function(){var r,n,a,o=window.GreenSockGlobals||window;if(e=o.TweenMax||o.TweenLite,e&&(r=(e.version+".0.0").split("."),n=!(Number(r[0])>0&&Number(r[1])>7),o=o.com.greensock,i=o.plugins.CSSPlugin,u=o.easing.Ease.map||{}),!e||!i||n)return e=null,!s&&window.console&&(window.console.log("The jquery.gsap.js plugin requires the TweenMax (or at least TweenLite and CSSPlugin) JavaScript file(s)."+(n?" Version "+r.join(".")+" is too old.":"")),s=!0),void 0;if(t.easing){for(a in u)t.easing[a]=_(u[a]);c=!1}};t.fn.animate=function(s,n,h,_){if(s=s||{},c&&(c(),!e||!i))return r.call(this,s,n,h,_);if(!a||s.skipGSAP===!0||"object"==typeof n&&"function"==typeof n.step||null!=s.scrollTop||null!=s.scrollLeft)return r.call(this,s,n,h,_);var f,p,m,d,g=t.speed(n,h,_),v={ease:u[g.easing]||(g.easing===!1?u.linear:u.swing)},y=this,T="object"==typeof n?n.specialEasing:null;for(p in s){if(f=s[p],f instanceof Array&&u[f[1]]&&(T=T||{},T[p]=f[1],f=f[0]),"toggle"===f||"hide"===f||"show"===f)return r.call(this,s,n,h,_);v[-1===p.indexOf("-")?p:t.camelCase(p)]=f}if(T){v=o(v),d=[];for(p in T)f=d[d.length]={},l(v,f),f.ease=u[T[p]]||v.ease,-1!==p.indexOf("-")&&(p=t.camelCase(p)),f[p]=v[p],delete v[p];0===d.length&&(d=null)}return m=function(i){var s,r=o(v);if(d)for(s=d.length;--s>-1;)e.to(this,t.fx.off?0:g.duration/1e3,d[s]);r.onComplete=function(){i?i():g.old&&t(this).each(g.old)},e.to(this,t.fx.off?0:g.duration/1e3,r)},g.queue!==!1?(y.queue(g.queue,m),"function"==typeof g.old&&y.queue(g.queue,function(t){g.old.call(this),t()})):m.call(y),y},t.fn.stop=function(t,i){if(n.call(this,t,i),e){if(i)for(var s,r=e.getTweensOf(this),a=r.length;--a>-1;)s=r[a].totalTime()/r[a].totalDuration(),s>0&&1>s&&r[a].seek(r[a].totalDuration());e.killTweensOf(this)}return this},t.gsap={enabled:function(t){a=t},version:"0.1.9"}})(jQuery);
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/uncompressed/plugins/DirectionalRotationPlugin.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: beta 0.2.1
3 | * DATE: 2014-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | **/
12 | var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node
13 | (_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() {
14 |
15 | "use strict";
16 |
17 | _gsScope._gsDefine.plugin({
18 | propName: "directionalRotation",
19 | version: "0.2.1",
20 | API: 2,
21 |
22 | //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
23 | init: function(target, value, tween) {
24 | if (typeof(value) !== "object") {
25 | value = {rotation:value};
26 | }
27 | this.finals = {};
28 | var cap = (value.useRadians === true) ? Math.PI * 2 : 360,
29 | min = 0.000001,
30 | p, v, start, end, dif, split;
31 | for (p in value) {
32 | if (p !== "useRadians") {
33 | split = (value[p] + "").split("_");
34 | v = split[0];
35 | start = parseFloat( (typeof(target[p]) !== "function") ? target[p] : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]() );
36 | end = this.finals[p] = (typeof(v) === "string" && v.charAt(1) === "=") ? start + parseInt(v.charAt(0) + "1", 10) * Number(v.substr(2)) : Number(v) || 0;
37 | dif = end - start;
38 | if (split.length) {
39 | v = split.join("_");
40 | if (v.indexOf("short") !== -1) {
41 | dif = dif % cap;
42 | if (dif !== dif % (cap / 2)) {
43 | dif = (dif < 0) ? dif + cap : dif - cap;
44 | }
45 | }
46 | if (v.indexOf("_cw") !== -1 && dif < 0) {
47 | dif = ((dif + cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;
48 | } else if (v.indexOf("ccw") !== -1 && dif > 0) {
49 | dif = ((dif - cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;
50 | }
51 | }
52 | if (dif > min || dif < -min) {
53 | this._addTween(target, p, start, start + dif, p);
54 | this._overwriteProps.push(p);
55 | }
56 | }
57 | }
58 | return true;
59 | },
60 |
61 | //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)
62 | set: function(ratio) {
63 | var pt;
64 | if (ratio !== 1) {
65 | this._super.setRatio.call(this, ratio);
66 | } else {
67 | pt = this._firstPT;
68 | while (pt) {
69 | if (pt.f) {
70 | pt.t[pt.p](this.finals[pt.p]);
71 | } else {
72 | pt.t[pt.p] = this.finals[pt.p];
73 | }
74 | pt = pt._next;
75 | }
76 | }
77 | }
78 |
79 | })._autoCSS = true;
80 |
81 | }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | var page = require('page');
2 |
3 | exports.install = function (Vue, args) {
4 | var Router = Vue.extend({
5 | created: function () {
6 | if (args.default) {
7 | page('/', function () {
8 | window.location = args.default;
9 | });
10 | }
11 |
12 | for (var route in this.$options.routes) {
13 | this.parseRoute([route], this.$options.routes);
14 | }
15 | },
16 |
17 | attached: function () {
18 | page();
19 | this.$broadcast('router:start');
20 | },
21 |
22 | methods: {
23 | parseRoute: function (fragments, list) {
24 | var route = fragments[fragments.length-1];
25 |
26 | if (typeof list[route] == 'string') {
27 | var component = list[route];
28 |
29 | page(fragments.join(""), (function (ctx) {
30 |
31 | Vue.nextTick((function () {
32 | this.context = {
33 | path: ctx.path,
34 | canonicalPath: ctx.canonicalPath,
35 | querystring: ctx.querystring,
36 | pathname: ctx.pathname,
37 | state: ctx.state,
38 | title: ctx.title,
39 | params: {}
40 | };
41 |
42 | for (var obj in ctx.params) {
43 | this.context.params[obj] = ctx.params[obj];
44 | }
45 |
46 | if (args.viewsPath) {
47 | var path = args.viewsPath + component + '/index.js';
48 | Vue.component(component, require(path));
49 | }
50 |
51 | this.currentView = component;
52 | this.$broadcast('router:update');
53 |
54 | }).bind(this));
55 |
56 | }).bind(this));
57 | }
58 | else {
59 | for (var subRoute in list[route]) {
60 | this.parseRoute(fragments.concat(subRoute), list[route]);
61 | }
62 | }
63 | },
64 |
65 | show: function (path) {
66 | page(path);
67 | }
68 | }
69 | });
70 |
71 | if (args.base) {
72 | page.base(args.base);
73 | }
74 |
75 | var viewClass = (args.class) ? args.class : 'view';
76 |
77 | Vue.page = new Router({
78 | el: args.rootElement,
79 | template: '',
80 | routes: args.routes,
81 | data: {
82 | currentView: null,
83 | context: null
84 | }
85 | });
86 |
87 | if (!args.cssTransitions) {
88 | Vue.transition('view', {
89 | beforeEnter: function () {
90 | if (this.beforeEnter) {
91 | this.beforeEnter();
92 | }
93 | },
94 | enter: function (el, done) {
95 | if (this.enter) {
96 | this.enter(done);
97 | }
98 | else {
99 | done();
100 | }
101 | },
102 | leave: function (el, done) {
103 | if (this.leave) {
104 | this.leave(done);
105 | }
106 | else {
107 | done();
108 | }
109 | }
110 | });
111 | }
112 | };
--------------------------------------------------------------------------------
/examples/webpack/src/VuePage.js:
--------------------------------------------------------------------------------
1 | var page = require('page');
2 |
3 | exports.install = function (Vue, args) {
4 | var Router = Vue.extend({
5 | created: function () {
6 | if (args.default) {
7 | page('/', function () {
8 | window.location = args.default;
9 | });
10 | }
11 |
12 | for (var route in this.$options.routes) {
13 | this.parseRoute([route], this.$options.routes);
14 | }
15 | },
16 |
17 | attached: function () {
18 | page();
19 | this.$broadcast('router:start');
20 | },
21 |
22 | methods: {
23 | parseRoute: function (fragments, list) {
24 | var route = fragments[fragments.length-1];
25 |
26 | if (typeof list[route] == 'string') {
27 | var component = list[route];
28 |
29 | page(fragments.join(""), (function (ctx) {
30 |
31 | Vue.nextTick((function () {
32 | this.context = {
33 | path: ctx.path,
34 | canonicalPath: ctx.canonicalPath,
35 | querystring: ctx.querystring,
36 | pathname: ctx.pathname,
37 | state: ctx.state,
38 | title: ctx.title,
39 | params: {}
40 | };
41 |
42 | for (var obj in ctx.params) {
43 | this.context.params[obj] = ctx.params[obj];
44 | }
45 |
46 | if (args.viewsPath) {
47 | var path = args.viewsPath + component + '/index.js';
48 | Vue.component(component, require(path));
49 | }
50 |
51 | this.currentView = component;
52 | this.$broadcast('router:update');
53 |
54 | }).bind(this));
55 |
56 | }).bind(this));
57 | }
58 | else {
59 | for (var subRoute in list[route]) {
60 | this.parseRoute(fragments.concat(subRoute), list[route]);
61 | }
62 | }
63 | },
64 |
65 | show: function (path) {
66 | page(path);
67 | }
68 | }
69 | });
70 |
71 | if (args.base) {
72 | page.base(args.base);
73 | }
74 |
75 | var viewClass = (args.class) ? args.class : 'view';
76 |
77 | Vue.page = new Router({
78 | el: args.rootElement,
79 | template: '',
80 | routes: args.routes,
81 | data: {
82 | currentView: null,
83 | context: null
84 | }
85 | });
86 |
87 | if (!args.cssTransitions) {
88 | Vue.transition('view', {
89 | beforeEnter: function () {
90 | if (this.beforeEnter) {
91 | this.beforeEnter();
92 | }
93 | },
94 | enter: function (el, done) {
95 | if (this.enter) {
96 | this.enter(done);
97 | }
98 | else {
99 | done();
100 | }
101 | },
102 | leave: function (el, done) {
103 | if (this.leave) {
104 | this.leave(done);
105 | }
106 | else {
107 | done();
108 | }
109 | }
110 | });
111 | }
112 | };
--------------------------------------------------------------------------------
/examples/browserify/app/scripts/VuePage.js:
--------------------------------------------------------------------------------
1 | var page = require('page');
2 |
3 | exports.install = function (Vue, args) {
4 | var Router = Vue.extend({
5 | created: function () {
6 | if (args.default) {
7 | page('/', function () {
8 | window.location = args.default;
9 | });
10 | }
11 |
12 | for (var route in this.$options.routes) {
13 | this.parseRoute([route], this.$options.routes);
14 | }
15 | },
16 |
17 | attached: function () {
18 | page();
19 | this.$broadcast('router:start');
20 | },
21 |
22 | methods: {
23 | parseRoute: function (fragments, list) {
24 | var route = fragments[fragments.length-1];
25 |
26 | if (typeof list[route] == 'string') {
27 | var component = list[route];
28 |
29 | page(fragments.join(""), (function (ctx) {
30 |
31 | Vue.nextTick((function () {
32 | this.context = {
33 | path: ctx.path,
34 | canonicalPath: ctx.canonicalPath,
35 | querystring: ctx.querystring,
36 | pathname: ctx.pathname,
37 | state: ctx.state,
38 | title: ctx.title,
39 | params: {}
40 | };
41 |
42 | for (var obj in ctx.params) {
43 | this.context.params[obj] = ctx.params[obj];
44 | }
45 |
46 | if (args.viewsPath) {
47 | var path = args.viewsPath + component + '/index.js'
48 | Vue.component(component, require(path))
49 | }
50 |
51 | this.currentView = component;
52 | this.$broadcast('router:update')
53 |
54 | }).bind(this));
55 |
56 | }).bind(this));
57 | }
58 | else {
59 | for (var subRoute in list[route]) {
60 | this.parseRoute(fragments.concat(subRoute), list[route]);
61 | }
62 | }
63 | },
64 |
65 | show: function (path) {
66 | page(path);
67 | }
68 | }
69 | });
70 |
71 | if (args.base) {
72 | page.base(args.base);
73 | }
74 |
75 | var viewClass = (args.class) ? args.class : 'view';
76 |
77 | Vue.page = new Router({
78 | el: args.rootElement,
79 | template: '',
80 | routes: args.routes,
81 | data: {
82 | currentView: null,
83 | context: null
84 | }
85 | });
86 |
87 | if (!args.cssTransitions) {
88 | Vue.transition('view', {
89 | beforeEnter: function () {
90 | if (this.beforeEnter) {
91 | this.beforeEnter();
92 | }
93 | },
94 | enter: function (el, done) {
95 | if (this.enter) {
96 | this.enter(done);
97 | }
98 | else {
99 | done();
100 | }
101 | },
102 | leave: function (el, done) {
103 | if (this.leave) {
104 | this.leave(done);
105 | }
106 | else {
107 | done();
108 | }
109 | }
110 | });
111 | }
112 | };
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/uncompressed/plugins/TextPlugin.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: 0.5.1
3 | * DATE: 2014-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | */
12 | var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node
13 | (_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() {
14 |
15 | "use strict";
16 |
17 | var _getText = function(e) {
18 | var type = e.nodeType,
19 | result = "";
20 | if (type === 1 || type === 9 || type === 11) {
21 | if (typeof(e.textContent) === "string") {
22 | return e.textContent;
23 | } else {
24 | for ( e = e.firstChild; e; e = e.nextSibling ) {
25 | result += _getText(e);
26 | }
27 | }
28 | } else if (type === 3 || type === 4) {
29 | return e.nodeValue;
30 | }
31 | return result;
32 | },
33 | TextPlugin = _gsScope._gsDefine.plugin({
34 | propName: "text",
35 | API: 2,
36 | version:"0.5.1",
37 |
38 | //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
39 | init: function(target, value, tween) {
40 | var i, shrt;
41 | if (!("innerHTML" in target)) {
42 | return false;
43 | }
44 | this._target = target;
45 | if (typeof(value) !== "object") {
46 | value = {value:value};
47 | }
48 | if (value.value === undefined) {
49 | this._text = this._original = [""];
50 | return true;
51 | }
52 | this._delimiter = value.delimiter || "";
53 | this._original = _getText(target).replace(/\s+/g, " ").split(this._delimiter);
54 | this._text = value.value.replace(/\s+/g, " ").split(this._delimiter);
55 | this._runBackwards = (tween.vars.runBackwards === true);
56 | if (this._runBackwards) {
57 | i = this._original;
58 | this._original = this._text;
59 | this._text = i;
60 | }
61 | if (typeof(value.newClass) === "string") {
62 | this._newClass = value.newClass;
63 | this._hasClass = true;
64 | }
65 | if (typeof(value.oldClass) === "string") {
66 | this._oldClass = value.oldClass;
67 | this._hasClass = true;
68 | }
69 | i = this._original.length - this._text.length,
70 | shrt = (i < 0) ? this._original : this._text;
71 | this._fillChar = value.fillChar || (value.padSpace ? " " : "");
72 | if (i < 0) {
73 | i = -i;
74 | }
75 | while (--i > -1) {
76 | shrt.push(this._fillChar);
77 | }
78 | return true;
79 | },
80 |
81 | //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)
82 | set: function(ratio) {
83 | if (ratio > 1) {
84 | ratio = 1;
85 | } else if (ratio < 0) {
86 | ratio = 0;
87 | }
88 | if (this._runBackwards) {
89 | ratio = 1 - ratio;
90 | }
91 | var l = this._text.length,
92 | i = (ratio * l + 0.5) | 0,
93 | applyNew, applyOld, str;
94 | if (this._hasClass) {
95 | applyNew = (this._newClass && i !== 0);
96 | applyOld = (this._oldClass && i !== l);
97 | str = (applyNew ? "" : "") + this._text.slice(0, i).join(this._delimiter) + (applyNew ? "" : "") + (applyOld ? "" : "") + this._delimiter + this._original.slice(i).join(this._delimiter) + (applyOld ? "" : "");
98 | } else {
99 | str = this._text.slice(0, i).join(this._delimiter) + this._delimiter + this._original.slice(i).join(this._delimiter);
100 | }
101 | this._target.innerHTML = (this._fillChar === " " && str.indexOf(" ") !== -1) ? str.split(" ").join(" ") : str;
102 | }
103 |
104 | }),
105 | p = TextPlugin.prototype;
106 |
107 | p._newClass = p._oldClass = p._delimiter = "";
108 |
109 | }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/uncompressed/plugins/CSSRulePlugin.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: beta 0.6.2
3 | * DATE: 2014-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | */
12 | var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node
13 | (_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() {
14 |
15 | "use strict";
16 |
17 | _gsScope._gsDefine("plugins.CSSRulePlugin", ["plugins.TweenPlugin","TweenLite","plugins.CSSPlugin"], function(TweenPlugin, TweenLite, CSSPlugin) {
18 |
19 | /** @constructor **/
20 | var CSSRulePlugin = function() {
21 | TweenPlugin.call(this, "cssRule");
22 | this._overwriteProps.length = 0;
23 | },
24 | _doc = window.document,
25 | _superSetRatio = CSSPlugin.prototype.setRatio,
26 | p = CSSRulePlugin.prototype = new CSSPlugin();
27 |
28 | p._propName = "cssRule";
29 | p.constructor = CSSRulePlugin;
30 | CSSRulePlugin.version = "0.6.2";
31 | CSSRulePlugin.API = 2;
32 |
33 | /**
34 | * Searches the style sheets in the document for a particular selector like ".myClass" or "a" or "a:hover" or ":after" and
35 | * returns a reference to that style sheet (or an array of them in the case of a pseudo selector like ":after"). Then you
36 | * can animate the individual properties of the style sheet.
37 | *
38 | * @param {!string} selector a string describing the selector, like ".myClass" or "a" or "a:hover" or ":after"
39 | * @return a reference to the style sheet (or an array of them in the case of a pseudo selector). If none was found, null is returned (or an empty array for a pseudo selector)
40 | */
41 | CSSRulePlugin.getRule = function(selector) {
42 | var ruleProp = _doc.all ? 'rules' : 'cssRules',
43 | ss = _doc.styleSheets,
44 | i = ss.length,
45 | pseudo = (selector.charAt(0) === ":"),
46 | j, curSS, cs, a;
47 | selector = (pseudo ? "" : ",") + selector.toLowerCase() + ","; //note: old versions of IE report tag name selectors as upper case, so we just change everything to lowercase.
48 | if (pseudo) {
49 | a = [];
50 | }
51 | while (--i > -1) {
52 | //Firefox may throw insecure operation errors when css is loaded from other domains, so try/catch.
53 | try {
54 | curSS = ss[i][ruleProp];
55 | } catch (e) {
56 | console.log(e);
57 | continue;
58 | }
59 | j = curSS.length;
60 | while (--j > -1) {
61 | cs = curSS[j];
62 | if (cs.selectorText && ("," + cs.selectorText.split("::").join(":").toLowerCase() + ",").indexOf(selector) !== -1) { //note: IE adds an extra ":" to pseudo selectors, so .myClass:after becomes .myClass::after, so we need to strip the extra one out.
63 | if (pseudo) {
64 | a.push(cs.style);
65 | } else {
66 | return cs.style;
67 | }
68 | }
69 | }
70 | }
71 | return a;
72 | };
73 |
74 |
75 | // @private gets called when the tween renders for the first time. This kicks everything off, recording start/end values, etc.
76 | p._onInitTween = function(target, value, tween) {
77 | if (target.cssText === undefined) {
78 | return false;
79 | }
80 | var div = target._gsProxy = target._gsProxy || _doc.createElement("div");
81 | this._ss = target;
82 | this._proxy = div.style;
83 | div.style.cssText = target.cssText;
84 | CSSPlugin.prototype._onInitTween.call(this, div, value, tween); //we just offload all the work to the regular CSSPlugin and then copy the cssText back over to the rule in the setRatio() method. This allows us to have all of the updates to CSSPlugin automatically flow through to CSSRulePlugin instead of having to maintain both
85 | return true;
86 | };
87 |
88 |
89 |
90 | // @private gets called every time the tween updates, passing the new ratio (typically a value between 0 and 1, but not always (for example, if an Elastic.easeOut is used, the value can jump above 1 mid-tween). It will always start and 0 and end at 1.
91 | p.setRatio = function(v) {
92 | _superSetRatio.call(this, v);
93 | this._ss.cssText = this._proxy.cssText;
94 | };
95 |
96 |
97 | TweenPlugin.activate([CSSRulePlugin]);
98 | return CSSRulePlugin;
99 |
100 | }, true);
101 |
102 | }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/uncompressed/plugins/ColorPropsPlugin.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: beta 1.2.1
3 | * DATE: 2013-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | **/
12 | var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node
13 | (_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() {
14 |
15 | "use strict";
16 |
17 | var _numExp = /(\d|\.)+/g,
18 | _colorLookup = {aqua:[0,255,255],
19 | lime:[0,255,0],
20 | silver:[192,192,192],
21 | black:[0,0,0],
22 | maroon:[128,0,0],
23 | teal:[0,128,128],
24 | blue:[0,0,255],
25 | navy:[0,0,128],
26 | white:[255,255,255],
27 | fuchsia:[255,0,255],
28 | olive:[128,128,0],
29 | yellow:[255,255,0],
30 | orange:[255,165,0],
31 | gray:[128,128,128],
32 | purple:[128,0,128],
33 | green:[0,128,0],
34 | red:[255,0,0],
35 | pink:[255,192,203],
36 | cyan:[0,255,255],
37 | transparent:[255,255,255,0]},
38 | _hue = function(h, m1, m2) {
39 | h = (h < 0) ? h + 1 : (h > 1) ? h - 1 : h;
40 | return ((((h * 6 < 1) ? m1 + (m2 - m1) * h * 6 : (h < 0.5) ? m2 : (h * 3 < 2) ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * 255) + 0.5) | 0;
41 | },
42 | _parseColor = function(color) {
43 | if (color === "" || color == null || color === "none") {
44 | return _colorLookup.transparent;
45 | }
46 | if (_colorLookup[color]) {
47 | return _colorLookup[color];
48 | }
49 | if (typeof(color) === "number") {
50 | return [color >> 16, (color >> 8) & 255, color & 255];
51 | }
52 | if (color.charAt(0) === "#") {
53 | if (color.length === 4) { //for shorthand like #9F0
54 | color = "#" + color.charAt(1) + color.charAt(1) + color.charAt(2) + color.charAt(2) + color.charAt(3) + color.charAt(3);
55 | }
56 | color = parseInt(color.substr(1), 16);
57 | return [color >> 16, (color >> 8) & 255, color & 255];
58 | }
59 | if (color.substr(0, 3) === "hsl") {
60 | color = color.match(_numExp);
61 | var h = (Number(color[0]) % 360) / 360,
62 | s = Number(color[1]) / 100,
63 | l = Number(color[2]) / 100,
64 | m2 = (l <= 0.5) ? l * (s + 1) : l + s - l * s,
65 | m1 = l * 2 - m2;
66 | if (color.length > 3) {
67 | color[3] = Number(color[3]);
68 | }
69 | color[0] = _hue(h + 1 / 3, m1, m2);
70 | color[1] = _hue(h, m1, m2);
71 | color[2] = _hue(h - 1 / 3, m1, m2);
72 | return color;
73 | }
74 | return color.match(_numExp) || _colorLookup.transparent;
75 | };
76 |
77 | _gsScope._gsDefine.plugin({
78 | propName: "colorProps",
79 | version: "1.2.1",
80 | priority: -1,
81 | API: 2,
82 |
83 | //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
84 | init: function(target, value, tween) {
85 | this._target = target;
86 | var p, s, c, pt;
87 | for (p in value) {
88 | c = _parseColor(value[p]);
89 | this._firstPT = pt = {_next:this._firstPT, p:p, f:(typeof(target[p]) === "function"), n:p, r:false};
90 | s = _parseColor( (!pt.f) ? target[p] : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]() );
91 | pt.s = Number(s[0]);
92 | pt.c = Number(c[0]) - pt.s;
93 | pt.gs = Number(s[1]);
94 | pt.gc = Number(c[1]) - pt.gs;
95 | pt.bs = Number(s[2]);
96 | pt.bc = Number(c[2]) - pt.bs;
97 | if ((pt.rgba = (s.length > 3 || c.length > 3))) { //detect an rgba() value
98 | pt.as = (s.length < 4) ? 1 : Number(s[3]);
99 | pt.ac = ((c.length < 4) ? 1 : Number(c[3])) - pt.as;
100 | }
101 | if (pt._next) {
102 | pt._next._prev = pt;
103 | }
104 | }
105 | return true;
106 | },
107 |
108 | //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)
109 | set: function(v) {
110 | var pt = this._firstPT, val;
111 | while (pt) {
112 | val = (pt.rgba ? "rgba(" : "rgb(") + ((pt.s + (v * pt.c)) >> 0) + ", " + ((pt.gs + (v * pt.gc)) >> 0) + ", " + ((pt.bs + (v * pt.bc)) >> 0) + (pt.rgba ? ", " + (pt.as + (v * pt.ac)) : "") + ")";
113 | if (pt.f) {
114 | this._target[pt.p](val);
115 | } else {
116 | this._target[pt.p] = val;
117 | }
118 | pt = pt._next;
119 | }
120 | }
121 | });
122 |
123 | }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
124 |
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/minified/easing/EasePack.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: beta 1.9.4
3 | * DATE: 2014-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | **/
12 | var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("easing.Back",["easing.Ease"],function(t){var e,i,s,r=_gsScope.GreenSockGlobals||_gsScope,n=r.com.greensock,a=2*Math.PI,o=Math.PI/2,h=n._class,l=function(e,i){var s=h("easing."+e,function(){},!0),r=s.prototype=new t;return r.constructor=s,r.getRatio=i,s},_=t.register||function(){},u=function(t,e,i,s){var r=h("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new s},!0);return _(r,t),r},c=function(t,e,i){this.t=t,this.v=e,i&&(this.next=i,i.prev=this,this.c=i.v-e,this.gap=i.t-t)},p=function(e,i){var s=h("easing."+e,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0),r=s.prototype=new t;return r.constructor=s,r.getRatio=i,r.config=function(t){return new s(t)},s},f=u("Back",p("BackOut",function(t){return(t-=1)*t*((this._p1+1)*t+this._p1)+1}),p("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),p("BackInOut",function(t){return 1>(t*=2)?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),m=h("easing.SlowMo",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:t>1&&(t=1),this._p=1!==t?e:0,this._p1=(1-t)/2,this._p2=t,this._p3=this._p1+this._p2,this._calcEnd=i===!0},!0),d=m.prototype=new t;return d.constructor=m,d.getRatio=function(t){var e=t+(.5-t)*this._p;return this._p1>t?this._calcEnd?1-(t=1-t/this._p1)*t:e-(t=1-t/this._p1)*t*t*t*e:t>this._p3?this._calcEnd?1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},m.ease=new m(.7,.7),d.config=m.config=function(t,e,i){return new m(t,e,i)},e=h("easing.SteppedEase",function(t){t=t||1,this._p1=1/t,this._p2=t+1},!0),d=e.prototype=new t,d.constructor=e,d.getRatio=function(t){return 0>t?t=0:t>=1&&(t=.999999999),(this._p2*t>>0)*this._p1},d.config=e.config=function(t){return new e(t)},i=h("easing.RoughEase",function(e){e=e||{};for(var i,s,r,n,a,o,h=e.taper||"none",l=[],_=0,u=0|(e.points||20),p=u,f=e.randomize!==!1,m=e.clamp===!0,d=e.template instanceof t?e.template:null,g="number"==typeof e.strength?.4*e.strength:.4;--p>-1;)i=f?Math.random():1/u*p,s=d?d.getRatio(i):i,"none"===h?r=g:"out"===h?(n=1-i,r=n*n*g):"in"===h?r=i*i*g:.5>i?(n=2*i,r=.5*n*n*g):(n=2*(1-i),r=.5*n*n*g),f?s+=Math.random()*r-.5*r:p%2?s+=.5*r:s-=.5*r,m&&(s>1?s=1:0>s&&(s=0)),l[_++]={x:i,y:s};for(l.sort(function(t,e){return t.x-e.x}),o=new c(1,1,null),p=u;--p>-1;)a=l[p],o=new c(a.x,a.y,o);this._prev=new c(0,0,0!==o.t?o:o.next)},!0),d=i.prototype=new t,d.constructor=i,d.getRatio=function(t){var e=this._prev;if(t>e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&e.t>=t;)e=e.prev;return this._prev=e,e.v+(t-e.t)/e.gap*e.c},d.config=function(t){return new i(t)},i.ease=new i,u("Bounce",l("BounceOut",function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),l("BounceIn",function(t){return 1/2.75>(t=1-t)?1-7.5625*t*t:2/2.75>t?1-(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),l("BounceInOut",function(t){var e=.5>t;return t=e?1-2*t:2*t-1,t=1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),u("Circ",l("CircOut",function(t){return Math.sqrt(1-(t-=1)*t)}),l("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),l("CircInOut",function(t){return 1>(t*=2)?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),s=function(e,i,s){var r=h("easing."+e,function(t,e){this._p1=t||1,this._p2=e||s,this._p3=this._p2/a*(Math.asin(1/this._p1)||0)},!0),n=r.prototype=new t;return n.constructor=r,n.getRatio=i,n.config=function(t,e){return new r(t,e)},r},u("Elastic",s("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*a/this._p2)+1},.3),s("ElasticIn",function(t){return-(this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*a/this._p2))},.3),s("ElasticInOut",function(t){return 1>(t*=2)?-.5*this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*a/this._p2):.5*this._p1*Math.pow(2,-10*(t-=1))*Math.sin((t-this._p3)*a/this._p2)+1},.45)),u("Expo",l("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),l("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),l("ExpoInOut",function(t){return 1>(t*=2)?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),u("Sine",l("SineOut",function(t){return Math.sin(t*o)}),l("SineIn",function(t){return-Math.cos(t*o)+1}),l("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),h("easing.EaseLookup",{find:function(e){return t.map[e]}},!0),_(r.SlowMo,"SlowMo","ease,"),_(i,"RoughEase","ease,"),_(e,"SteppedEase","ease,"),f},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()();
--------------------------------------------------------------------------------
/examples/browserify/bower_components/gsap/src/uncompressed/plugins/ScrollToPlugin.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * VERSION: 1.7.4
3 | * DATE: 2014-07-17
4 | * UPDATES AND DOCS AT: http://www.greensock.com
5 | *
6 | * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7 | * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8 | * Club GreenSock members, the software agreement that was issued with your membership.
9 | *
10 | * @author: Jack Doyle, jack@greensock.com
11 | **/
12 | var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node
13 | (_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() {
14 |
15 | "use strict";
16 |
17 | var _doc = document.documentElement,
18 | _window = window,
19 | _max = function(element, axis) {
20 | var dim = (axis === "x") ? "Width" : "Height",
21 | scroll = "scroll" + dim,
22 | client = "client" + dim,
23 | body = document.body;
24 | return (element === _window || element === _doc || element === body) ? Math.max(_doc[scroll], body[scroll]) - (_window["inner" + dim] || Math.max(_doc[client], body[client])) : element[scroll] - element["offset" + dim];
25 | },
26 |
27 | ScrollToPlugin = _gsScope._gsDefine.plugin({
28 | propName: "scrollTo",
29 | API: 2,
30 | version:"1.7.4",
31 |
32 | //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
33 | init: function(target, value, tween) {
34 | this._wdw = (target === _window);
35 | this._target = target;
36 | this._tween = tween;
37 | if (typeof(value) !== "object") {
38 | value = {y:value}; //if we don't receive an object as the parameter, assume the user intends "y".
39 | }
40 | this.vars = value;
41 | this._autoKill = (value.autoKill !== false);
42 | this.x = this.xPrev = this.getX();
43 | this.y = this.yPrev = this.getY();
44 | if (value.x != null) {
45 | this._addTween(this, "x", this.x, (value.x === "max") ? _max(target, "x") : value.x, "scrollTo_x", true);
46 | this._overwriteProps.push("scrollTo_x");
47 | } else {
48 | this.skipX = true;
49 | }
50 | if (value.y != null) {
51 | this._addTween(this, "y", this.y, (value.y === "max") ? _max(target, "y") : value.y, "scrollTo_y", true);
52 | this._overwriteProps.push("scrollTo_y");
53 | } else {
54 | this.skipY = true;
55 | }
56 | return true;
57 | },
58 |
59 | //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)
60 | set: function(v) {
61 | this._super.setRatio.call(this, v);
62 |
63 | var x = (this._wdw || !this.skipX) ? this.getX() : this.xPrev,
64 | y = (this._wdw || !this.skipY) ? this.getY() : this.yPrev,
65 | yDif = y - this.yPrev,
66 | xDif = x - this.xPrev;
67 |
68 | if (this._autoKill) {
69 | //note: iOS has a bug that throws off the scroll by several pixels, so we need to check if it's within 7 pixels of the previous one that we set instead of just looking for an exact match.
70 | if (!this.skipX && (xDif > 7 || xDif < -7) && x < _max(this._target, "x")) {
71 | this.skipX = true; //if the user scrolls separately, we should stop tweening!
72 | }
73 | if (!this.skipY && (yDif > 7 || yDif < -7) && y < _max(this._target, "y")) {
74 | this.skipY = true; //if the user scrolls separately, we should stop tweening!
75 | }
76 | if (this.skipX && this.skipY) {
77 | this._tween.kill();
78 | if (this.vars.onAutoKill) {
79 | this.vars.onAutoKill.apply(this.vars.onAutoKillScope || this._tween, this.vars.onAutoKillParams || []);
80 | }
81 | }
82 | }
83 | if (this._wdw) {
84 | _window.scrollTo((!this.skipX) ? this.x : x, (!this.skipY) ? this.y : y);
85 | } else {
86 | if (!this.skipY) {
87 | this._target.scrollTop = this.y;
88 | }
89 | if (!this.skipX) {
90 | this._target.scrollLeft = this.x;
91 | }
92 | }
93 | this.xPrev = this.x;
94 | this.yPrev = this.y;
95 | }
96 |
97 | }),
98 | p = ScrollToPlugin.prototype;
99 |
100 | ScrollToPlugin.max = _max;
101 |
102 | p.getX = function() {
103 | return (!this._wdw) ? this._target.scrollLeft : (_window.pageXOffset != null) ? _window.pageXOffset : (_doc.scrollLeft != null) ? _doc.scrollLeft : document.body.scrollLeft;
104 | };
105 |
106 | p.getY = function() {
107 | return (!this._wdw) ? this._target.scrollTop : (_window.pageYOffset != null) ? _window.pageYOffset : (_doc.scrollTop != null) ? _doc.scrollTop : document.body.scrollTop;
108 | };
109 |
110 | p._kill = function(lookup) {
111 | if (lookup.scrollTo_x) {
112 | this.skipX = true;
113 | }
114 | if (lookup.scrollTo_y) {
115 | this.skipY = true;
116 | }
117 | return this._super._kill.call(this, lookup);
118 | };
119 |
120 | }); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
--------------------------------------------------------------------------------
/examples/webpack/build/1.build.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([1],[
2 | /* 0 */,
3 | /* 1 */
4 | /***/ function(module, exports, __webpack_require__) {
5 |
6 | module.exports = {
7 | template: __webpack_require__(9),
8 | replace: true,
9 | data: function () {
10 | return {
11 | msg: 'This is page A.',
12 | leftName: 'Bruce Lee',
13 | rightName: 'Chuck Norris'
14 | }
15 | },
16 | components: {
17 | 'app-header': __webpack_require__(7),
18 | 'app-pane': __webpack_require__(8)
19 | }
20 | }
21 |
22 | /***/ },
23 | /* 2 */,
24 | /* 3 */,
25 | /* 4 */,
26 | /* 5 */,
27 | /* 6 */,
28 | /* 7 */
29 | /***/ function(module, exports, __webpack_require__) {
30 |
31 | __webpack_require__(25)
32 |
33 | module.exports = {
34 | template: __webpack_require__(27),
35 | paramAttributes: ['msg']
36 | }
37 |
38 | /***/ },
39 | /* 8 */
40 | /***/ function(module, exports, __webpack_require__) {
41 |
42 | __webpack_require__(28)
43 |
44 | module.exports = {
45 | template: __webpack_require__(30),
46 | replace: true,
47 | paramAttributes: ['side', 'name']
48 | }
49 |
50 | /***/ },
51 | /* 9 */
52 | /***/ function(module, exports, __webpack_require__) {
53 |
54 | module.exports = "";
55 |
56 | /***/ },
57 | /* 10 */,
58 | /* 11 */,
59 | /* 12 */,
60 | /* 13 */,
61 | /* 14 */,
62 | /* 15 */,
63 | /* 16 */,
64 | /* 17 */,
65 | /* 18 */,
66 | /* 19 */,
67 | /* 20 */,
68 | /* 21 */,
69 | /* 22 */,
70 | /* 23 */,
71 | /* 24 */,
72 | /* 25 */
73 | /***/ function(module, exports, __webpack_require__) {
74 |
75 | // style-loader: Adds some css to the DOM by adding a