Skip to content

Commit c84044a

Browse files
committed
Include source-files
1 parent cfec9f9 commit c84044a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+213850
-4
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.sass-cache/
2+
node_modules/

Gruntfile.js

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
module.exports = function(grunt) {
2+
3+
// Project configuration.
4+
grunt.initConfig({
5+
pkg : grunt.file.readJSON('package.json'),
6+
uglify : {
7+
options : {
8+
banner : '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
9+
},
10+
build : {
11+
src : 'dist/<%= pkg.name %>.js',
12+
dest : 'dist/<%= pkg.name %>.min.js'
13+
}
14+
},
15+
jshint : {
16+
all : ['Gruntfile.js', 'src/*.js']
17+
},
18+
requirejs : {
19+
compile : {
20+
options : {
21+
almond : true,
22+
wrap : {
23+
startFile : 'build/start.frag',
24+
endFile : 'build/end.frag'
25+
},
26+
"baseUrl" : "src",
27+
"name" : "quagga",
28+
"out" : "dist/quagga.js",
29+
"include" : ['quagga'],
30+
"optimize" : "none",
31+
"findNestedDependencies" : true,
32+
"skipSemiColonInsertion" : true,
33+
34+
"shim" : {
35+
"typedefs" : {
36+
"deps" : [],
37+
"exports" : "typedefs"
38+
},
39+
"glMatrix" : {
40+
"deps" : ["typedefs"],
41+
"exports" : "glMatrix"
42+
},
43+
"glMatrixAddon" : {
44+
"deps" : ["glMatrix"],
45+
"exports" : "glMatrixAddon"
46+
}
47+
},
48+
49+
"paths" : {
50+
"typedefs" : "typedefs",
51+
"glMatrix" : "vendor/glMatrix",
52+
"glMatrixAddon" : "glMatrixAddon"
53+
}
54+
}
55+
}
56+
}
57+
});
58+
59+
// Load the plugin that provides the "uglify" task.
60+
grunt.loadNpmTasks('grunt-contrib-uglify');
61+
grunt.loadNpmTasks('grunt-contrib-jshint');
62+
63+
grunt.loadNpmTasks('grunt-requirejs');
64+
// Default task(s).
65+
grunt.registerTask('default', ['jshint', 'requirejs', 'uglify']);
66+
67+
};

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ In order to take full advantage of quaggaJS, the browser needs to support the `g
1717

1818
In cases where real-time decoding is not needed, or the platform does not support `getUserMedia` QuaggaJS is also capable of decoding image-files.
1919

20-
## Installation
21-
22-
Just clone the repository and include `quagga.min.js` in your project. The code uses [requirejs][requirejs] for dependency management.
23-
2420
## Usage
2521

22+
Just download the pre-built version `quagga.min.js` from the `dist` folder and include in your project.
23+
2624
The library exposes the following API
2725

2826
### quagga.init(config, callback)
@@ -59,6 +57,10 @@ quagga.decodeSingle({
5957
});
6058
```
6159

60+
## Build it yourself
61+
62+
In case you want to build the library directly from the source code, just run `npm install` follewed by the `grunt` task. This places two files in the `dist` folder, of which `quagga.min.js` is the minified version.
63+
6264
[zxing_github]: https://github.com/zxing/zxing
6365
[teaser_left]: https://github.com/serratus/quaggaJS/blob/master/doc/img/mobile-located.png
6466
[teaser_right]: https://github.com/serratus/quaggaJS/blob/master/doc/img/mobile-detected.png

build/end.frag

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
return require('quagga');
2+
}));

build/start.frag

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
(function (root, factory) {
2+
if (typeof define === 'function' && define.amd) {
3+
//Allow using this built library as an AMD module
4+
//in another project. That other project will only
5+
//see this AMD call, not the internal modules in
6+
//the closure below.
7+
define([], factory);
8+
} else {
9+
//Browser globals case. Just assign the
10+
//result to a property on the global.
11+
root.Quagga = factory();
12+
}
13+
}(this, function () {

config.rb

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
# Require any additional compass plugins here.
3+
4+
5+
# Set this to the root of your project when deployed:
6+
http_path = "/"
7+
css_dir = "css"
8+
sass_dir = "sass"
9+
images_dir = "img"
10+
javascripts_dir = "js"
11+
fonts_dir="fonts"
12+
13+
# You can select your preferred output style here (can be overridden via the command line):
14+
# output_style = :expanded or :nested or :compact or :compressed
15+
16+
# To enable relative paths to assets via compass helper functions. Uncomment:
17+
# relative_assets = true
18+
19+
# To disable debugging comments that display the original location of your selectors. Uncomment:
20+
# line_comments = false
21+
22+
23+
# If you prefer the indented syntax, you might want to regenerate this
24+
# project again passing --syntax sass, or you can uncomment this:
25+
# preferred_syntax = :sass
26+
# and then run:
27+
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass

0 commit comments

Comments
 (0)