Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
jnordberg committed May 20, 2013
0 parents commit 8b530dd
Show file tree
Hide file tree
Showing 47 changed files with 6,568 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
site/build/
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# gif.js

FIXME



31 changes: 31 additions & 0 deletions bin/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

URL="https://github.com/jnordberg/gif.js"
TMP="./dist/tmp"

if [ -f ./node_modules/.bin/browserify ]; then
VERSION=`./bin/version`
echo "Packaging gif.js $VERSION"
./node_modules/.bin/cjsify \
--export GIF \
--root ./src/ \
--source-map ./dist/gif.js.map \
--output ./dist/gif.js \
--inline-sources \
--minify \
./src/gif.coffee
echo -e "\n// gif.js $VERSION - $URL" >> ./dist/gif.js
./node_modules/.bin/cjsify \
--root ./src/ \
--no-node \
--source-map ./dist/gif.worker.js.map \
--output ./dist/gif.worker.js \
--inline-sources \
--minify \
./src/gif.worker.coffee
echo -e "\n// gif.worker.js $VERSION - $URL" >> ./dist/gif.worker.js
exit $?
else
echo "Dependencies missing. Run npm install"
exit 1
fi
4 changes: 4 additions & 0 deletions bin/version
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env node
var fs = require('fs');
var pkg = JSON.parse(fs.readFileSync('package.json'));
process.stdout.write(pkg.version);
5 changes: 5 additions & 0 deletions dist/gif.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/gif.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions dist/gif.worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/gif.worker.js.map

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "gif.js",
"version": "0.1.0",
"description": "Full-featured JavaScript GIF encoder",
"author": "Johan Nordberg <[email protected]>",
"main": "index.js",
"repository": "",
"devDependencies": {
"commonjs-everywhere": ">=0.7.2"
},
"scripts": {
"prepublish": "./bin/build"
},
"keywords": [
"gif",
"animation",
"encoder"
],
"license": "MIT",
"readmeFilename": "README.md"
}
14 changes: 14 additions & 0 deletions site/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"locals": {
"name": "gif.js",
"url": "http://jnordberg.github.io/gif.js",
"description": "Full featured GIF encoder library that runs in your browser.",
"keywords": "gif, encoder, animation, browser, unicorn"
},
"plugins": [
"wintersmith-browserify",
"wintersmith-less",
"wintersmith-nunjucks",
"./plugins/jsignore.coffee"
]
}
18 changes: 18 additions & 0 deletions site/contents/code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

```javascript
var gif = new GIF({
workers: 2,
quality: 10
});

gif.addImage(imageElement);
gif.addImage(canvasElement, 200);
// second argument is delay

gif.on('finished', function(blob) {
window.open(URL.createObjectURL(blob));
});

gif.render();

```
1 change: 1 addition & 0 deletions site/contents/gif.js
1 change: 1 addition & 0 deletions site/contents/gif.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions site/contents/gif.worker.js
1 change: 1 addition & 0 deletions site/contents/gif.worker.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added site/contents/images/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/contents/images/test/anim-ref.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/contents/images/test/anim1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/contents/images/test/anim2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/contents/images/test/anim3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/contents/images/test/anim4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/contents/images/test/test1-orig.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/contents/images/test/test1-ref.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/contents/images/test/test2-orig.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/contents/images/test/test2-ref.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/contents/images/test/test3-orig.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/contents/images/test/test3-orig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/contents/images/test/test3-ref.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions site/contents/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"template": "index.html"
}
2 changes: 2 additions & 0 deletions site/contents/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Disallow:
Loading

0 comments on commit 8b530dd

Please sign in to comment.