Skip to content

Commit 94c3b35

Browse files
committed
Initial Commit
0 parents  commit 94c3b35

19 files changed

+940
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules
2+
/bower_components

.jshintrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"bitwise": false,
3+
"curly": true,
4+
"eqeqeq": true,
5+
"esversion": 5,
6+
"freeze": true,
7+
"funcscope": true,
8+
"loopfunc": false,
9+
"maxdepth": 9,
10+
"noarg": true,
11+
"nocomma": true,
12+
"nonbsp": true,
13+
"nonew": true,
14+
"notypeof": true,
15+
"predef": [ "MY_GLOBAL" ],
16+
"shadow": true,
17+
"singleGroups": false,
18+
"undef": true,
19+
"unused": false,
20+
"sub":true
21+
}

.npmignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
src/
2+
test/
3+
images/
4+
docs/
5+
.jshintrc
6+
.travis.yml
7+
jsdoc.json

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: node_js
2+
node_js:
3+
- "4.0"
4+
before_script:
5+
- npm install -g gulp

Gulpfile.js

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
'use strict';
2+
3+
var fs = require('fs');
4+
var pkg = JSON.parse( fs.readFileSync('./package.json') );
5+
var gulp = require('gulp');
6+
var sourcemaps = require('gulp-sourcemaps');
7+
var plugins = require('gulp-load-plugins')();
8+
var gutil = require('gulp-util');
9+
var qunit = require('gulp-qunit');
10+
var shell = require('gulp-shell');
11+
var merge = require('merge-stream');
12+
var size = require('gulp-check-filesize');
13+
var jshint = require('gulp-jshint');
14+
var rename = require('gulp-rename');
15+
var insert = require('gulp-insert');
16+
var glob = require('glob');
17+
18+
var build = {
19+
filename: 'anim8js-jquery.js',
20+
minified: 'anim8js-jquery.min.js',
21+
output: './build/',
22+
include: [
23+
'./src/_header.js',
24+
'./src/FactoryJQuery.js',
25+
'./src/anim8.js',
26+
'./src/clone.js',
27+
'./src/data.js',
28+
'./src/sequence.js',
29+
'./src/_footer.js'
30+
]
31+
};
32+
33+
var comments = [
34+
"/*", pkg.name, pkg.version, '-', pkg.description, 'by', pkg.author, "*/\n"
35+
];
36+
37+
var executeMinifiedBuild = function(props)
38+
{
39+
return function() {
40+
return gulp
41+
.src( props.output + props.filename )
42+
.pipe( rename( props.minified ) )
43+
.pipe( sourcemaps.init() )
44+
.pipe( plugins.uglify().on('error', gutil.log) )
45+
.pipe( insert.prepend( comments.join(' ') ) )
46+
.pipe( sourcemaps.write('.') )
47+
.pipe( size({enableGzip: true}) )
48+
.pipe( gulp.dest( props.output ) )
49+
;
50+
};
51+
};
52+
53+
var executeBuild = function(props)
54+
{
55+
return function() {
56+
return gulp
57+
.src( props.include )
58+
.pipe( plugins.concat( props.filename ) )
59+
.pipe( insert.prepend( comments.join(' ') ) )
60+
.pipe( size({enableGzip: true}) )
61+
.pipe( gulp.dest( props.output ) )
62+
.pipe( jshint() )
63+
.pipe( jshint.reporter('default') )
64+
.pipe( jshint.reporter('fail') )
65+
;
66+
};
67+
};
68+
69+
var executeTest = function(file)
70+
{
71+
return function() {
72+
return gulp
73+
.src( file )
74+
.pipe( qunit() )
75+
;
76+
};
77+
};
78+
79+
gulp.task('lint', function() {
80+
return gulp
81+
.src( build.output + build.filename )
82+
.pipe( jshint() )
83+
.pipe( jshint.reporter('default') )
84+
.pipe( jshint.reporter('fail') )
85+
;
86+
});
87+
88+
gulp.task( 'js', executeBuild( build ) );
89+
gulp.task( 'js:min', ['js'], executeMinifiedBuild( build ) );
90+
91+
gulp.task( 'default', ['js:min']);
92+
93+
gulp.task( 'test', ['js'], executeTest( './test/index.html' ) );
94+
95+
gulp.task( 'docs', shell.task(['./node_modules/.bin/jsdoc -c jsdoc.json']));
96+
gulp.task( 'clean', shell.task(['rm -rf build/*.js', 'rm -rf build/*.map']));

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 anim8js
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# anim8js-jquery
2+
3+
[anim8](https://github.com/ClickerMonkey/anim8js) your HTML elements with [jQuery](https://jquery.com/)

bower.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "anim8js-jquery",
3+
"version": "1.0.0",
4+
"homepage": "http://clickermonkey.github.io/anim8js-jquery",
5+
"authors": [
6+
"Philip Diffenderfer <[email protected]>"
7+
],
8+
"description": "anim8 your HTML elements with jQuery",
9+
"main": "build/anim8js-jquery.js",
10+
"keywords": [
11+
"javascript",
12+
"animation",
13+
"DOM",
14+
"HTMLElement",
15+
"jQuery"
16+
],
17+
"license": "MIT",
18+
"ignore": [
19+
"**/.*",
20+
"node_modules",
21+
"bower_components",
22+
"test",
23+
"src"
24+
],
25+
"dependencies": {
26+
"anim8js": "^1.0.0",
27+
"anim8js-dom": "^1.0.0"
28+
}
29+
}

0 commit comments

Comments
 (0)