Skip to content

armgit / anime

Public Imported from GitHub
0

JavaScript animation engine

Add build script

Julian Garnierc4e62db21320
diff --git a/.gitignore b/.gitignore
index 185b1b41..df702bf3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
.DS_Store
*.log
+
+node_modules
diff --git a/build.js b/build.js
new file mode 100644
index 00000000..456ca27e
--- /dev/null
+++ b/build.js
@@ -0,0 +1,11 @@
+const compressor = require('node-minify');
+
+compressor.minify({
+ compressor: 'gcc',
+ input: 'anime.js',
+ output: 'anime.min.js',
+ callback: (err, min) => {
+ if (err) console.error(err);
+ console.log('Compilation was a success! 👍');
+ }
+});
diff --git a/examples/3d-transforms.html b/examples/3d-transforms.html
index 18d2e167..447741da 100644
--- a/examples/3d-transforms.html
+++ b/examples/3d-transforms.html
@@ -34,7 +34,7 @@
<body>
<section class="wrapper"></section>
- <script src="../anime.js"></script>
+ <script src="anime.min.js"></script>
<script>
var wrapperEl = document.querySelector('.wrapper');
diff --git a/examples/callbacks.html b/examples/callbacks.html
index 7ea00a46..a1dbe915 100644
--- a/examples/callbacks.html
+++ b/examples/callbacks.html
@@ -15,7 +15,7 @@
<div class="green"></div>
</article>
</section>
- <script src="../anime.js"></script>
+ <script src="anime.min.js"></script>
<script>
var blueAnimation = anime({
diff --git a/examples/colors.html b/examples/colors.html
index 2bc72f3a..412adf5f 100644
--- a/examples/colors.html
+++ b/examples/colors.html
@@ -44,7 +44,7 @@
<div class="rgb">rgb</div>
<div class="hsl">hsl</div>
</section>
- <script src="../anime.js"></script>
+ <script src="anime.min.js"></script>
<script>
var hex = anime({
targets: '.hex',
diff --git a/examples/dom-stress-test-multiple-animations.html b/examples/dom-stress-test-multiple-animations.html
index a6502571..289389ca 100644
--- a/examples/dom-stress-test-multiple-animations.html
+++ b/examples/dom-stress-test-multiple-animations.html
@@ -28,7 +28,7 @@
</style>
</head>
<body>
- <script src="../anime.js"></script>
+ <script src="anime.min.js"></script>
<script>
var maxElements = 200;
diff --git a/examples/easings.html b/examples/easings.html
index 21c32b70..f44e22c0 100644
--- a/examples/easings.html
+++ b/examples/easings.html
@@ -32,7 +32,7 @@
</style>
</head>
<body>
- <script src="../anime.js"></script>
+ <script src="anime.min.js"></script>
<script>
var sectionEl = document.querySelector('section');
diff --git a/examples/functions-as-timing-values.html b/examples/functions-as-timing-values.html
index cfe08d80..44e3172a 100644
--- a/examples/functions-as-timing-values.html
+++ b/examples/functions-as-timing-values.html
@@ -46,7 +46,7 @@
<div></div>
<div></div>
</section>
- <script src="../anime.js"></script>
+ <script src="anime.min.js"></script>
<script>
var sectionEl = document.querySelector('section');
diff --git a/examples/logo-animation.html b/examples/logo-animation.html
index 229ae492..b076bfb1 100644
--- a/examples/logo-animation.html
+++ b/examples/logo-animation.html
@@ -203,7 +203,7 @@
ga('create', 'UA-79927007-1', 'auto');
ga('send', 'pageview');
</script>
- <script src="../anime.js"></script>
+ <script src="anime.min.js"></script>
<script>
var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
var ff = navigator.userAgent.indexOf('Firefox') > 0;
diff --git a/examples/mgs-logo.html b/examples/mgs-logo.html
index 7bb64c51..9506ca11 100644
--- a/examples/mgs-logo.html
+++ b/examples/mgs-logo.html
@@ -167,7 +167,7 @@
</g>
</svg>
</section>
- <script src="../anime.js"></script>
+ <script src="anime.min.js"></script>
<script>
var katakanaStripes = anime({
targets: '.stripes path',
diff --git a/examples/motion-path.html b/examples/motion-path.html
index 0923d761..6a56655b 100644
--- a/examples/motion-path.html
+++ b/examples/motion-path.html
@@ -28,7 +28,7 @@
</svg>
</article>
</section>
- <script src="../anime.js"></script>
+ <script src="anime.min.js"></script>
<script>
var path = anime.path('path');
diff --git a/examples/playback.html b/examples/playback.html
index fbbe0562..47d9a5ff 100644
--- a/examples/playback.html
+++ b/examples/playback.html
@@ -45,7 +45,7 @@
<input class="percents" type="text"></input>
</fieldset>
</section>
- <script src="../anime.js"></script>
+ <script src="anime.min.js"></script>
<script>
var playButton = document.querySelector('.play');
diff --git a/examples/random-multiple-values.html b/examples/random-multiple-values.html
index 26281b36..0bb71012 100644
--- a/examples/random-multiple-values.html
+++ b/examples/random-multiple-values.html
@@ -25,7 +25,7 @@
</style>
</head>
<body>
- <script src="../anime.js"></script>
+ <script src="anime.min.js"></script>
<script>
var maxElements = 210;
diff --git a/examples/remove-elements-from-animations.html b/examples/remove-elements-from-animations.html
index 2f120a28..c91438d3 100644
--- a/examples/remove-elements-from-animations.html
+++ b/examples/remove-elements-from-animations.html
@@ -34,7 +34,7 @@
<div class="green"></div>
</article>
</section>
- <script src="../anime.js"></script>
+ <script src="anime.min.js"></script>
<script>
var animation = anime({
diff --git a/examples/svg-path.html b/examples/svg-path.html
index aadda0da..7196ee5c 100644
--- a/examples/svg-path.html
+++ b/examples/svg-path.html
@@ -37,7 +37,7 @@
<path fill="rgb(100,200,0)" d="M32,160 C32,115 36,104 70,70 C104,36 115,32 160,32 C205,32 216,36 250,70 C284,104 288,115 288,160 C288,205 284,216 250,250 C216,284 205,288 160,288 C115,288 104,284 70,250 C36,216 32,205 32,160 Z"></path>
</svg>
</section>
- <script src="../anime.js"></script>
+ <script src="anime.min.js"></script>
<script>
anime({
targets: 'svg',
diff --git a/examples/volume.html b/examples/volume.html
index 5da003f5..96834089 100644
--- a/examples/volume.html
+++ b/examples/volume.html
@@ -10,7 +10,7 @@
<section>
<audio controls autoplay src="sounds/Myon-Neutrino.m4a"></audio>
</section>
- <script src="../anime.js"></script>
+ <script src="anime.min.js"></script>
<script>
var audio = document.querySelector('audio');
diff --git a/package.json b/package.json
index 62d0b7c6..fdf99df2 100644
--- a/package.json
+++ b/package.json
@@ -22,5 +22,11 @@
"url": "https://github.com/juliangarnier/anime/issues"
},
"homepage": "http://anime-js.com",
- "files": ["anime.js"]
+ "files": [
+ "anime.js",
+ "anime.min.js"
+ ],
+ "dependencies": {
+ "node-minify": "^2.0.2"
+ }
}