This repository has been archived by the owner on Jun 23, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* introduce the fast lite version
- Loading branch information
Showing
15 changed files
with
668 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import buble from 'rollup-plugin-buble' | ||
import uglify from 'rollup-plugin-uglify' | ||
import { minify } from 'uglify-es' | ||
|
||
const { min } = process.env | ||
const isMinify = min === 'true' | ||
const minSuffix = isMinify ? '.min' : '' | ||
|
||
const plugins = [ | ||
// ES6->ES5 syntax/code transpiler | ||
buble({ | ||
// Spread to Object merge/assign | ||
objectAssign: `Object.assign`, | ||
// Features | ||
transforms: { | ||
// For of feature | ||
dangerousForOf: true | ||
} | ||
}) | ||
] | ||
|
||
if ( isMinify ) { | ||
plugins.push( | ||
// Minify | ||
uglify({ | ||
sourceMap: { | ||
filename: `src/Tween.js`, | ||
url: `lite/Tween${minSuffix}.js.map` | ||
} | ||
}, minify) | ||
); | ||
} | ||
|
||
export default { | ||
entry: 'src/Tween.Lite.js', | ||
format: 'umd', | ||
sourceMap: true, | ||
context: 'this', | ||
dest: `lite/Tween${minSuffix}.js`, | ||
moduleName: 'TWEEN', | ||
plugins: plugins | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import buble from 'rollup-plugin-buble' | ||
import uglify from 'rollup-plugin-uglify' | ||
import { minify } from 'uglify-es' | ||
|
||
const { min } = process.env | ||
const isMinify = min === 'true' | ||
const minSuffix = isMinify ? '.min' : '' | ||
|
||
const plugins = [ | ||
// ES6->ES5 syntax/code transpiler | ||
buble({ | ||
// Spread to Object merge/assign | ||
objectAssign: `Object.assign`, | ||
// Features | ||
transforms: { | ||
// For of feature | ||
dangerousForOf: true | ||
} | ||
}) | ||
] | ||
|
||
if ( isMinify ) { | ||
plugins.push( | ||
// Minify | ||
uglify({ | ||
sourceMap: { | ||
filename: `src/Tween.Lite.js`, | ||
url: `dist/Tween.Lite${minSuffix}.js.map` | ||
} | ||
}, minify) | ||
); | ||
} | ||
|
||
export default { | ||
entry: 'src/Tween.Lite.js', | ||
format: 'umd', | ||
sourceMap: true, | ||
context: 'this', | ||
dest: `dist/Tween.Lite${minSuffix}.js`, | ||
moduleName: 'TWEEN', | ||
plugins: plugins | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { has, get, getAll, removeAll, remove, add, now, update, autoPlay, Plugins, isRunning } from './dist/core' | ||
import Easing from './dist/Easing' | ||
import Tween from './dist/Tween.Lite' | ||
export { Plugins, has, get, getAll, removeAll, remove, add, now, update, autoPlay, isRunning, Tween, Easing } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.