mirror of
https://github.com/lrsjng/jquery-qrcode.git
synced 2026-08-12 20:01:55 +08:00
Maintenance.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
|
||||
[package.json]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
|
||||
[.travis.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
|
||||
[*.jade]
|
||||
trim_trailing_whitespace = false
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
bower_components
|
||||
build
|
||||
local
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# jQuery.qrcode
|
||||
|
||||
[![web][web-img]][web] [![GitHub][github-img]][github] [![bower][bower-img]][github]
|
||||
[![license][license-img]][github] [![web][web-img]][web] [![github][github-img]][github] [![bower][bower-img]][github]
|
||||
|
||||
jQuery plugin to dynamically generate QR codes. Uses [QR Code Generator][qrcode] (MIT).
|
||||
|
||||
@@ -32,8 +32,9 @@ THE SOFTWARE.
|
||||
[web]: http://larsjung.de/qrcode/
|
||||
[github]: https://github.com/lrsjng/jquery-qrcode
|
||||
|
||||
[web-img]: http://img.shields.io/badge/web-larsjung.de/qrcode-a0a060.svg?style=flat
|
||||
[github-img]: http://img.shields.io/badge/GitHub-lrsjng/jquery--qrcode-a0a060.svg?style=flat
|
||||
[bower-img]: http://img.shields.io/badge/bower-lrsjng/jquery--qrcode-a0a060.svg?style=flat
|
||||
[license-img]: http://img.shields.io/badge/license-MIT-a0a060.svg?style=flat-square
|
||||
[web-img]: http://img.shields.io/badge/web-larsjung.de/qrcode-a0a060.svg?style=flat-square
|
||||
[github-img]: http://img.shields.io/badge/github-lrsjng/jquery--qrcode-a0a060.svg?style=flat-square
|
||||
[bower-img]: http://img.shields.io/badge/bower-lrsjng/jquery--qrcode-a0a060.svg?style=flat-square
|
||||
|
||||
[qrcode]: https://github.com/kazuhikoarase/qrcode-generator
|
||||
|
||||
+7
-8
@@ -1,24 +1,23 @@
|
||||
{
|
||||
"name": "jquery-qrcode",
|
||||
"version": "0.10.0",
|
||||
"version": "0.10.1",
|
||||
"description": "generate QR codes dynamically",
|
||||
"homepage": "http://larsjung.de/jquery-qrcode/",
|
||||
"authors": [
|
||||
"Lars Jung <lrsjng@gmail.com> (http://larsjung.de)"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "dist/jquery.qrcode.js",
|
||||
"keywords": [
|
||||
"jquery",
|
||||
"javascript",
|
||||
"qrcode"
|
||||
],
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/lrsjng/jquery-qrcode.git"
|
||||
},
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"bower_components",
|
||||
"build",
|
||||
"local",
|
||||
"makefile.js",
|
||||
"mkrfile.js",
|
||||
"node_modules",
|
||||
"src",
|
||||
"test",
|
||||
|
||||
Vendored
+432
-31
File diff suppressed because it is too large
Load Diff
Vendored
+2
-2
File diff suppressed because one or more lines are too long
-92
@@ -1,92 +0,0 @@
|
||||
/*jshint node: true */
|
||||
'use strict';
|
||||
|
||||
|
||||
module.exports = function (make) {
|
||||
|
||||
|
||||
var path = require('path'),
|
||||
pkg = require('./package.json'),
|
||||
|
||||
$ = make.fQuery,
|
||||
|
||||
root = path.resolve(__dirname),
|
||||
src = path.join(root, 'src'),
|
||||
dist = path.join(root, 'dist'),
|
||||
build = path.join(root, 'build');
|
||||
|
||||
|
||||
make.version('=0.11.0');
|
||||
make.defaults('release');
|
||||
|
||||
|
||||
make.target('clean', [], 'delete build folder').sync(function () {
|
||||
|
||||
$.DELETE(build);
|
||||
$.DELETE(dist);
|
||||
});
|
||||
|
||||
|
||||
make.target('lint', [], 'lint all JavaScript files with JSHint').sync(function () {
|
||||
|
||||
var options = {
|
||||
// Enforcing Options
|
||||
bitwise: true,
|
||||
curly: true,
|
||||
eqeqeq: true,
|
||||
forin: true,
|
||||
latedef: true,
|
||||
newcap: true,
|
||||
noempty: true,
|
||||
plusplus: true,
|
||||
trailing: true,
|
||||
undef: true,
|
||||
|
||||
// Environments
|
||||
browser: true
|
||||
},
|
||||
global = {
|
||||
'jQuery': true,
|
||||
'qrcode': true
|
||||
};
|
||||
|
||||
$(src + ': jquery.qrcode.js, demo/scripts.js').log(-3)
|
||||
.jshint(options, global);
|
||||
});
|
||||
|
||||
|
||||
make.target('build', ['clean', 'lint'], 'build all files').sync(function () {
|
||||
|
||||
var header = '/* ' + pkg.displayName + ' ' + pkg.version + ' - ' + pkg.homepage + ' - uses //github.com/kazuhikoarase/qrcode-generator (MIT) */\n';
|
||||
var env = {pkg: pkg};
|
||||
|
||||
$(src + ': jquery.qrcode.js')
|
||||
.includify()
|
||||
.handlebars(env)
|
||||
.wrap(header)
|
||||
.WRITE($.map.p(src, dist))
|
||||
.WRITE($.map.p(src, build).s('.js', '-' + pkg.version + '.js'))
|
||||
.uglifyjs()
|
||||
.wrap(header)
|
||||
.WRITE($.map.p(src, dist).s('.js', '.min.js'))
|
||||
.WRITE($.map.p(src, build).s('.js', '-' + pkg.version + '.min.js'));
|
||||
|
||||
$(src + ': **, ! *.js')
|
||||
.handlebars(env)
|
||||
.WRITE($.map.p(src, build));
|
||||
|
||||
$(root + ': *.md')
|
||||
.handlebars(env)
|
||||
.WRITE($.map.p(root, build));
|
||||
});
|
||||
|
||||
|
||||
make.target('release', ['build'], 'create a zipball').async(function (done, fail) {
|
||||
|
||||
$(build + ': **').shzip({
|
||||
target: path.join(build, pkg.name + '-' + pkg.version + '.zip'),
|
||||
dir: build,
|
||||
callback: done
|
||||
});
|
||||
});
|
||||
};
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
/*jshint node: true */
|
||||
'use strict';
|
||||
|
||||
|
||||
module.exports = function (suite) {
|
||||
|
||||
|
||||
var path = require('path');
|
||||
var root = path.resolve(__dirname);
|
||||
var src = path.join(root, 'src');
|
||||
var dist = path.join(root, 'dist');
|
||||
var build = path.join(root, 'build');
|
||||
|
||||
var $ = require('fquery');
|
||||
$.plugin('fquery-handlebars');
|
||||
$.plugin('fquery-includeit');
|
||||
$.plugin('fquery-jshint');
|
||||
$.plugin('fquery-jszip');
|
||||
$.plugin('fquery-uglifyjs');
|
||||
|
||||
|
||||
suite.defaults('release');
|
||||
|
||||
|
||||
suite.target('clean', [], 'delete build folder').task(function () {
|
||||
|
||||
$([build, dist], {dirs: true}).delete();
|
||||
});
|
||||
|
||||
|
||||
suite.target('lint', [], 'lint all JavaScript files with JSHint').task(function () {
|
||||
|
||||
var options = {
|
||||
// Enforcing Options
|
||||
bitwise: true,
|
||||
curly: true,
|
||||
eqeqeq: true,
|
||||
forin: true,
|
||||
latedef: true,
|
||||
newcap: true,
|
||||
noempty: true,
|
||||
plusplus: true,
|
||||
trailing: true,
|
||||
undef: true,
|
||||
|
||||
// Environments
|
||||
browser: true
|
||||
};
|
||||
var global = {
|
||||
'jQuery': true,
|
||||
'qrcode': true
|
||||
};
|
||||
|
||||
$(src + ': jquery.qrcode.js, demo/scripts.js')
|
||||
.jshint(options, global);
|
||||
});
|
||||
|
||||
|
||||
suite.target('release', ['clean', 'lint'], 'build all files and create a zipball').task(function () {
|
||||
|
||||
var pkg = require('./package.json');
|
||||
var header = '/* ' + pkg.displayName + ' ' + pkg.version + ' - ' + pkg.homepage + ' - uses //github.com/kazuhikoarase/qrcode-generator (MIT) */\n';
|
||||
var target = path.join(build, pkg.name + '-' + pkg.version + '.zip');
|
||||
var env = {pkg: pkg};
|
||||
|
||||
$(src + ': jquery.qrcode.js')
|
||||
.includeit()
|
||||
.wrap(header)
|
||||
.write($.map.p(src, dist), true)
|
||||
.write($.map.p(src, build).s('.js', '-' + pkg.version + '.js'), true)
|
||||
.uglifyjs()
|
||||
.wrap(header)
|
||||
.write($.map.p(src, dist).s('.js', '.min.js'), true)
|
||||
.write($.map.p(src, build).s('.js', '-' + pkg.version + '.min.js'), true);
|
||||
|
||||
$(src + ': **, ! *.js')
|
||||
.handlebars(env)
|
||||
.write($.map.p(src, build), true);
|
||||
|
||||
$(root + ': *.md')
|
||||
.write($.map.p(root, build), true);
|
||||
|
||||
$(build + ': **')
|
||||
.jszip({dir: build})
|
||||
.write(target, true);
|
||||
});
|
||||
};
|
||||
+10
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jquery-qrcode",
|
||||
"displayName": "jQuery.qrcode",
|
||||
"version": "0.10.0",
|
||||
"version": "0.10.1",
|
||||
"description": "generate QR codes dynamically",
|
||||
"homepage": "http://larsjung.de/jquery-qrcode/",
|
||||
"bugs": "https://github.com/lrsjng/jquery-qrcode/issues",
|
||||
@@ -10,5 +10,14 @@
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/lrsjng/jquery-qrcode.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"fquery": "~0.12.17",
|
||||
"fquery-handlebars": "~0.1.0",
|
||||
"fquery-includeit": "~0.1.1",
|
||||
"fquery-jshint": "~0.1.0",
|
||||
"fquery-jszip": "~0.1.0",
|
||||
"fquery-uglifyjs": "~0.1.3",
|
||||
"mkr": "~0.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
+3
-6
@@ -4,14 +4,13 @@
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>{{pkg.displayName}} {{pkg.version}} · Demo</title>
|
||||
<meta name="description" content="demo for the jQuery plug in jQuery.qrcode (http://larsjung.de/qrcode/)">
|
||||
<meta name="author" content="Lars Jung">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="author" href="http://plus.google.com/106403733398479106535">
|
||||
<link rel="shortcut icon" href="icon-16.ico">
|
||||
<link rel="apple-touch-icon" href="icon-48.png" type="image/png">
|
||||
<link rel="shortcut icon" href="dummy.png" type="image/png">
|
||||
<link rel="apple-touch-icon" href="dummy.png" type="image/png">
|
||||
<link href='http://fonts.googleapis.com/css?family=Ubuntu:400,700' rel='stylesheet'>
|
||||
<link href='styles.css' rel='stylesheet'>
|
||||
<script src="jquery-1.10.2.js"></script>
|
||||
@@ -55,8 +54,6 @@
|
||||
<input id="quiet" type="range" value="1" min="0" max="4" step="1" />
|
||||
<label for="radius">CORNER RADIUS (not in Opera):</label>
|
||||
<input id="radius" type="range" value="50" min="0" max="50" step="10" />
|
||||
<!-- <hr/> -->
|
||||
<!-- <a id="download" download="qrcode.png">DOWNLOAD</a> -->
|
||||
</div>
|
||||
|
||||
<div class="control right">
|
||||
|
||||
+7
-6
@@ -1,8 +1,9 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
(function ($) {
|
||||
'use strict';
|
||||
var $ = jQuery;
|
||||
|
||||
var isOpera = Object.prototype.toString.call(window.opera) === '[object Opera]',
|
||||
var isOpera = Object.prototype.toString.call(window.opera) === '[object Opera]',
|
||||
|
||||
guiValuePairs = [
|
||||
["size", "px"],
|
||||
@@ -86,7 +87,7 @@
|
||||
};
|
||||
|
||||
|
||||
$(function () {
|
||||
$(function () {
|
||||
|
||||
if (isOpera) {
|
||||
$('html').addClass('opera');
|
||||
@@ -98,6 +99,6 @@
|
||||
$("input, textarea, select").on("input change", update);
|
||||
$(window).load(update);
|
||||
update();
|
||||
});
|
||||
});
|
||||
|
||||
}(jQuery));
|
||||
}());
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
body {
|
||||
font-family: Ubuntu;
|
||||
margin: 0;
|
||||
|
||||
+14
-12
@@ -1,9 +1,10 @@
|
||||
(function ($) {
|
||||
'use strict';
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var $ = jQuery;
|
||||
|
||||
// Wrapper for the original QR code generator.
|
||||
var QRCode = function (text, level, version, quiet) {
|
||||
var QRCode = function (text, level, version, quiet) {
|
||||
|
||||
// `qrcode` is the single public function that will be defined by the `QR Code Generator`
|
||||
// at the end of the file.
|
||||
@@ -444,9 +445,9 @@
|
||||
image: null
|
||||
};
|
||||
|
||||
// Register the plugin
|
||||
// -------------------
|
||||
$.fn.qrcode = function(options) {
|
||||
// Register the plugin
|
||||
// -------------------
|
||||
$.fn.qrcode = function(options) {
|
||||
|
||||
var settings = $.extend({}, defaults, options);
|
||||
|
||||
@@ -458,12 +459,13 @@
|
||||
$(this).append(createHTML(settings));
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
// jQuery.qrcode plug in code ends here
|
||||
// jQuery.qrcode plug in code ends here
|
||||
|
||||
// QR Code Generator
|
||||
// =================
|
||||
// @include "qrcode.js"
|
||||
|
||||
}(jQuery));
|
||||
// QR Code Generator
|
||||
// =================
|
||||
// @include "qrcode.js"
|
||||
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user