Skip to content

Commit

Permalink
Add build script
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangarnier committed Dec 28, 2016
1 parent feeea15 commit c4e62db
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DS_Store

*.log

node_modules
11 changes: 11 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
@@ -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! 👍');
}
});
2 changes: 1 addition & 1 deletion examples/3d-transforms.html
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion examples/callbacks.html
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion examples/colors.html
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion examples/dom-stress-test-multiple-animations.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</style>
</head>
<body>
<script src="../anime.js"></script>
<script src="anime.min.js"></script>
<script>

var maxElements = 200;
Expand Down
2 changes: 1 addition & 1 deletion examples/easings.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</style>
</head>
<body>
<script src="../anime.js"></script>
<script src="anime.min.js"></script>
<script>

var sectionEl = document.querySelector('section');
Expand Down
2 changes: 1 addition & 1 deletion examples/functions-as-timing-values.html
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion examples/logo-animation.html
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/mgs-logo.html
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion examples/motion-path.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</svg>
</article>
</section>
<script src="../anime.js"></script>
<script src="anime.min.js"></script>
<script>

var path = anime.path('path');
Expand Down
2 changes: 1 addition & 1 deletion examples/playback.html
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion examples/random-multiple-values.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</style>
</head>
<body>
<script src="../anime.js"></script>
<script src="anime.min.js"></script>
<script>

var maxElements = 210;
Expand Down
2 changes: 1 addition & 1 deletion examples/remove-elements-from-animations.html
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion examples/svg-path.html
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion examples/volume.html
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit c4e62db

Please sign in to comment.