diff --git a/examples/qrcode.js b/examples/qrcode.js index c6e85b40..31d9c18a 100644 --- a/examples/qrcode.js +++ b/examples/qrcode.js @@ -1,3 +1,12 @@ +/** + * @module QRCode + * @license MIT + * @version 1.0.3 + * @author nuintun + * @description A pure JavaScript QRCode encode and decode library. + * @see https://github.com/nuintun/qrcode#readme + */ + (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define('qrcode', ['exports'], factory) : diff --git a/examples/rollup.config.js b/examples/rollup.config.js index bacb9f48..beeedbd1 100644 --- a/examples/rollup.config.js +++ b/examples/rollup.config.js @@ -5,13 +5,25 @@ */ import del from 'del'; +const pkg = require('../package.json'); import resolve from '@rollup/plugin-node-resolve'; +const banner = `/** + * @module QRCode + * @license ${pkg.license} + * @version ${pkg.version} + * @author ${pkg.author.name} + * @description ${pkg.description} + * @see ${pkg.homepage} + */ +`; + del.sync(['examples/qrcode.js'], { force: true }); export default { input: 'esnext/index.js', output: { + banner, format: 'umd', name: 'QRCode', esModule: false, diff --git a/package.json b/package.json index 13c92fb1..9af913fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nuintun/qrcode", - "version": "1.0.2", + "version": "1.0.3", "description": "A pure JavaScript QRCode encode and decode library.", "main": "es5/index.js", "module": "esnext/index.js", @@ -14,7 +14,10 @@ "zxing" ], "sideEffects": false, - "author": "nuintun", + "author": { + "name": "nuintun", + "email": "nuintun@qq.com" + }, "license": "MIT", "bugs": { "url": "https://github.com/nuintun/qrcode/issues"