Skip to content

Commit

Permalink
Use SDPX license headers, ensure they are preserved in builds
Browse files Browse the repository at this point in the history
This
- Moves the license out of the qrcodegen src file and into a standalone
LICENSE
- Adds copyright & spdx license headers to src files (https://spdx.dev/ids/)
- Ensures license headers are preserved in the build output
  • Loading branch information
zpao committed Mar 13, 2022
1 parent 96e7e45 commit d2afadb
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 21 deletions.
6 changes: 6 additions & 0 deletions src/index.tsx
@@ -1,3 +1,9 @@
/**
* @license qrcode.react
* Copyright (c) Paul O'Shannessy
* SPDX-License-Identifier: ISC
*/

import React, {useRef, useEffect} from 'react';
import type {CSSProperties} from 'react';
import qrcodegen from './third-party/qrcodegen';
Expand Down
22 changes: 22 additions & 0 deletions src/third-party/LICENSE
@@ -0,0 +1,22 @@
QR Code generator library (TypeScript)

Copyright (c) Project Nayuki.
https://www.nayuki.io/page/qr-code-generator-library

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
25 changes: 4 additions & 21 deletions src/third-party/qrcodegen/index.ts
@@ -1,24 +1,7 @@
/*
* QR Code generator library (TypeScript)
*
* Copyright (c) Project Nayuki. (MIT License)
* https://www.nayuki.io/page/qr-code-generator-library
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* - The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* - The Software is provided "as is", without warranty of any kind, express or
* implied, including but not limited to the warranties of merchantability,
* fitness for a particular purpose and noninfringement. In no event shall the
* authors or copyright holders be liable for any claim, damages or other
* liability, whether in an action of contract, tort or otherwise, arising from,
* out of or in connection with the Software or the use or other dealings in the
* Software.
/**
* @license QR Code generator library (TypeScript)
* Copyright (c) Project Nayuki.
* SPDX-License-Identifier: MIT
*/

"use strict";
Expand Down
7 changes: 7 additions & 0 deletions tsup.config.ts
@@ -0,0 +1,7 @@
import {defineConfig} from 'tsup';

export default defineConfig({
esbuildOptions(options) {
options.legalComments = 'inline';
},
});

0 comments on commit d2afadb

Please sign in to comment.