Skip to content

Commit

Permalink
Merge pull request #1 from neocotic/develop
Browse files Browse the repository at this point in the history
Release 4.0.0
  • Loading branch information
neocotic authored Jun 1, 2017
2 parents 03950a5 + b241624 commit 3b2e4f2
Show file tree
Hide file tree
Showing 27 changed files with 3,662 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
21 changes: 21 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"extends": "notninja/es5",
"env": {
"node": true
},
"rules": {
"max-params": [
"error",
5
],
"no-bitwise": "off",
"no-empty-function": "off",
"no-invalid-this": "off",
"no-unused-vars": [
"warn",
{
"args": "none"
}
]
}
}
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.*
AUTHORS.md
CHANGES.md
CONTRIBUTING.md
README.md
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
sudo: false
language: node_js
node_js:
- "4"
- "6"
- "8"
before_script:
- npm install -g npm@latest
script:
- npm run ci
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/f1c9df131febcfade24c
on_success: always
on_failure: always
on_start: never
8 changes: 8 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Authors ordered by first contribution

* Tom Zerucha <[email protected]>
* Alasdair Mercer <[email protected]>
* Alexandre Perrin <[email protected]>
* Michael Mason
* Benjamin Besse <[email protected]>
* Marek Vavrecan <[email protected]>
110 changes: 110 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
## Version 4.0.0, 2017.06.02

* Split into multiple modules [#53](https://github.com/neocotic/qrious/issues/53) (**breaking change**)
* Remove QRious.VERSION [#84](https://github.com/neocotic/qrious/issues/84) (**breaking change**)

## Version 3.0.1, 2017.06.01

* Correct file sizes of distribution files in README [#82](https://github.com/neocotic/qrious/issues/82)

## Version 3.0.0, 2017.06.01

* Reduce size of distribution files [#59](https://github.com/neocotic/qrious/issues/59) (**breaking change**)
* Drop support for Node.js < 4 [#74](https://github.com/neocotic/qrious/issues/74) (**breaking change**)
* Remove QRious.DEFAULTS [#77](https://github.com/neocotic/qrious/issues/77) (**breaking change**)
* Rewrite code in ES5 [#81](https://github.com/neocotic/qrious/issues/81) (**breaking change**)

## Version 2.3.0, 2017.05.31

* Enable setting of multiple properties at once resulting in a single re-render [#69](https://github.com/neocotic/qrious/issues/69)
* Deferring or avoiding ImageRenderer [#71](https://github.com/neocotic/qrious/issues/71)
* Switch to container-based Travis builds for faster boot times [#73](https://github.com/neocotic/qrious/issues/73)
* Change code style to be more contributor-friendly [#75](https://github.com/neocotic/qrious/issues/75)
* Improve download links in README [#76](https://github.com/neocotic/qrious/issues/76)

## Version 2.2.0, 2016.10.30

* Add `backgroundAlpha` and `foregroundAlpha` options to control transparency [#63](https://github.com/neocotic/qrious/issues/63)

## Version 2.1.0, 2016.10.04

* Allow `padding` to be set explicitly [#44](https://github.com/neocotic/qrious/issues/44)
* Fix support for older browsers [#55](https://github.com/neocotic/qrious/issues/55)
* Update code style to fit with other projects
* Update build system to run on older Node.js versions at a reduced capacity

## Version 2.0.2, 2016.08.05

* Fix bug where mask is incorrectly applied [#50](https://github.com/neocotic/qrious/issues/50)

## Version 2.0.1, 2016.07.03

* Correct license mentioned into `README.md`

## Version 2.0.0, 2016.06.26

* Rename library to QRious and move package from `qr-js` to `qrious`
* Completely redesign API to follow OOP pattern for simplicity
* Remove `save` and `saveSync` method
* Remove `noConflict` method
* Remove documentation generated by `docco`
* Restructure code base to make it more maintainable and use [Rollup](http://rollupjs.org) to build it
* Provide better built-in support for [Browserify](http://browserify.org) and [Webpack](http://webpack.github.io) etc
* Switch from [JSHint](https://github.com/jshint/jshint) to [ESLint](http://eslint.org)
* Add `demo.html` to allow contributors to experiment and test with changes due to lack of unit tests
* Remove `INSTALL.md` and consolidate contents into `README.md` and `CONTRIBUTING.md`
* Add [EditorConfig](http://editorconfig.org) file
* Add support for [Travis CI](https://travis-ci.org)

## Version 1.1.4, 2015.11.11

* Fix padding issues [#2](https://github.com/neocotic/qrious/issues/2)
* Make the QR code center-aligned [#35](https://github.com/neocotic/qrious/pull/35)
* Update [node-canvas](https://github.com/Automattic/node-canvas) dependency version to support [Node.js](https://nodejs.org) v4 and above [#38](https://github.com/neocotic/qrious/pull/38)

## Version 1.1.3, 2014.09.01

* Revert back to [GPL License](http://www.gnu.org/licenses/) [#23](https://github.com/neocotic/qrious/issues/23)

## Version 1.1.2, 2014.04.27

* Fix "too many open files" bug [#20](https://github.com/neocotic/qrious/issues/20)

## Version 1.1.1, 2013.12.03

* Fix bug with IIFE

## Version 1.1.0, 2013.12.02

* Fix [RequireJS](http://requirejs.org) support [#9](https://github.com/neocotic/qrious/issues/9)
* Remove [Ender](http://enderjs.com) support [#13](https://github.com/neocotic/qrious/issues/13)
* Improve code formatting and style [#14](https://github.com/neocotic/qrious/issues/14)
* Support different MIME types for `toDataURL` and other related functions [#16](https://github.com/neocotic/qrious/issues/16)
* Remove unnecessary callback arguments from synchronous functions [#17](https://github.com/neocotic/qrious/issues/17)
* Make `save` fully asynchronous [#17](https://github.com/neocotic/qrious/issues/17)
* Add `saveSync` for synchronous saving [#17](https://github.com/neocotic/qrious/issues/17)
* Add [Grunt](http://gruntjs.com) build system [#18](https://github.com/neocotic/qrious/issues/18)
* Generate source map as part of build [#18](https://github.com/neocotic/qrious/issues/18)
* Improve developer documentation [#18](https://github.com/neocotic/qrious/issues/18)
* Add support for [Bower](https://bower.io) [#19](https://github.com/neocotic/qrious/issues/19)
* Many small fixes and tweaks

## Version 1.0.3, 2011.12.19

* Rename `QRCode` to `qr` [#3](https://github.com/neocotic/qrious/issues/3)
* Remove all deprecated methods [#3](https://github.com/neocotic/qrious/issues/3)
* Reformat code and add additional, along with some original, code comments [#4](https://github.com/neocotic/qrious/issues/4)
* Add support for [Node.js](https://nodejs.org), [CommonJS](http://www.commonjs.org) and [Ender](http://enderjs.com) [#6](https://github.com/neocotic/qrious/issues/6)
* Add optional `callback` functionality to API methods [#6](https://github.com/neocotic/qrious/issues/6)
* Allow `data` arguments to be an object or string value [#7](https://github.com/neocotic/qrious/issues/7)
* Add `VERSION` property to the API [#8](https://github.com/neocotic/qrious/issues/8)
* Add `toDataURL`, `save` and `noConflict` methods to the API [#8](https://github.com/neocotic/qrious/issues/8)
* Now distributed under the MIT license

## Version 1.0.2, 2011.08.31

* Deprecate `generateCanvas` and `generateImage` and replaced with `canvas` and `image` respectively [#1](https://github.com/neocotic/qrious/issues/1)

## Version 1.0.1, 2011.08.12

* Allow customisation of colours used when rendering
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Contributing

If you have any questions about [QRious Core](https://github.com/neocotic/qrious-core) please feel free to
[raise an issue](https://github.com/neocotic/qrious-core/issues/new).

Please [search existing issues](https://github.com/neocotic/qrious-core/issues) for the same feature and/or issue before
raising a new issue. Commenting on an existing issue is usually preferred over raising duplicate issues.

Please ensure that all files conform to the coding standards, using the same coding style as the rest of the code base.
This can be done easily via command-line:

``` bash
# install/update package dependencies
$ npm install
# run test suite
$ npm test
```

You must have at least [Node.js](https://nodejs.org) version 4 or newer and [npm](https://npmjs.com) installed version 5
or newer installed.

All pull requests should be made to the `develop` branch.

Don't forget to add your details to the list of
[AUTHORS.md](https://github.com/neocotic/qrious-core/blob/master/AUTHORS.md) if you want your contribution to be
recognized by others.
16 changes: 16 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
QRious
Copyright (C) 2017 Alasdair Mercer
Copyright (C) 2010 Tom Zerucha

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
93 changes: 93 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
.d88888b. 8888888b. d8b .d8888b.
d88P" "Y88b 888 Y88b Y8P d88P Y88b
888 888 888 888 888 888
888 888 888 d88P 888 .d88b. 888 888 .d8888b 888 .d88b. 888d888 .d88b.
888 888 8888888P" 888 d88""88b 888 888 88K 888 d88""88b 888P" d8P Y8b
888 Y8b 888 888 T88b 888 888 888 888 888 "Y8888b. 888 888 888 888 888 88888888
Y88b.Y8b88P 888 T88b 888 Y88..88P Y88b 888 X88 Y88b d88P Y88..88P 888 Y8b.
"Y888888" 888 T88b 888 "Y88P" "Y88888 88888P' "Y8888P" "Y88P" 888 "Y8888
Y8b

[QRious Core](https://github.com/neocotic/qrious-core) is the core engine for
[QRious](https://github.com/neocotic/qrious)' QR code generation as well as modules to support other environments (e.g.
[QRious Node](https://github.com/neocotic/node-qrious)).

[![Chat](https://img.shields.io/gitter/room/neocotic/qrious.svg?style=flat-square)](https://gitter.im/neocotic/qrious)
[![Build Status](https://img.shields.io/travis/neocotic/qrious-core/develop.svg?style=flat-square)](https://travis-ci.org/neocotic/qrious-core)
[![Dependency Status](https://img.shields.io/david/neocotic/qrious-core.svg?style=flat-square)](https://david-dm.org/neocotic/qrious-core)
[![Dev Dependency Status](https://img.shields.io/david/dev/neocotic/qrious-core.svg?style=flat-square)](https://david-dm.org/neocotic/qrious-core?type=dev)
[![License](https://img.shields.io/npm/l/qrious-core.svg?style=flat-square)](https://github.com/neocotic/qrious-core/blob/master/LICENSE.md)
[![Release](https://img.shields.io/npm/v/qrious-core.svg?style=flat-square)](https://www.npmjs.com/package/qrious-core)

* [Install](#install)
* [API](#api)
* [Bugs](#bugs)
* [Contributors](#contributors)
* [License](#license)

## Install

Install using `npm`:

``` bash
$ npm install --save qrious-core
```

You will most likely never need to depend on `qrious-core` directly. Instead, you will probably want to install a module
that supports your desired environment. For example:

* [qrious](https://github.com/neocotic/qrious) for browser
* [node-qrious](https://github.com/neocotic/node-qrious) for Node.js

## API

As this is the core of QRious, it contains all of the QR code generation logic and, since it's designed to use HTML5
canvas to render the QR code, all that consumers need to do is define and register an implementation of
`ElementService`.

Most modules that use QRious Core will look something like the following:

``` javascript
var ElementService = require('qrious-core/src/service/element/ElementService');
var QRious = require('qrious-core');

var ExampleElementService = ElementService.extend({
createCanvas: function() { /* ... */ },
createImage: function() { /* ... */ },
isCanvas: function(element) { /* ... */ },
isImage: function(element) { /* ... */ }
});

QRious.use(new ExampleElementService());

module.exports = QRious;
```

This allows the core to control the primary API and keep it consistent across all environments. With the above in place,
you are free to import QRious and use it as you would anywhere else.

You will find the primary API documentation on [QRious](https://github.com/neocotic/qrious). All direct consumers of
core should also reference this to help developers find the information easily. However, they are encouraged to provide
environment-specific examples.

## Bugs

If you have any problems with QRious Core or would like to see changes currently in development you can do so
[here](https://github.com/neocotic/qrious-core/issues).

## Contributors

If you want to contribute, you're a legend! Information on how you can do so can be found in
[CONTRIBUTING.md](https://github.com/neocotic/qrious-core/blob/master/CONTRIBUTING.md). We want your suggestions and
pull requests!

A list of QRious Core contributors can be found in
[AUTHORS.md](https://github.com/neocotic/qrious-core/blob/master/AUTHORS.md).

## License

Copyright © 2017 Alasdair Mercer
Copyright © 2010 Tom Zerucha

See [LICENSE.md](https://github.com/neocotic/qrious-core/blob/master/LICENSE.md) for more information on our GPLv3
license.
22 changes: 22 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* QRious
* Copyright (C) 2017 Alasdair Mercer
* Copyright (C) 2010 Tom Zerucha
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

'use strict';

module.exports = require('./src/QRious');
Loading

0 comments on commit 3b2e4f2

Please sign in to comment.