legal: Make esbuild generate & link licensing information

This commit is contained in:
Vendicated 2022-10-20 19:21:21 +02:00 committed by Ven
parent 50047dd3c2
commit c80ed1b824
3 changed files with 7 additions and 11 deletions

View file

@ -3,13 +3,7 @@
"parser": "@typescript-eslint/parser", "parser": "@typescript-eslint/parser",
"ignorePatterns": ["dist"], "ignorePatterns": ["dist"],
"rules": { "rules": {
"quotes": [ "quotes": ["error", "double", { "avoidEscape": true }],
"error",
"double",
{
"avoidEscape": true
}
],
"jsx-quotes": ["error", "prefer-double"], "jsx-quotes": ["error", "prefer-double"],
"no-mixed-spaces-and-tabs": "error", "no-mixed-spaces-and-tabs": "error",
"indent": ["error", 4, { "SwitchCase": 1 }], "indent": ["error", 4, { "SwitchCase": 1 }],
@ -25,7 +19,7 @@
"block-spacing": ["error", "always"], "block-spacing": ["error", "always"],
"object-curly-spacing": ["error", "always"], "object-curly-spacing": ["error", "always"],
"eqeqeq": ["error", "always", { "null": "ignore" }], "eqeqeq": ["error", "always", { "null": "ignore" }],
"spaced-comment": ["error", "always"], "spaced-comment": ["error", "always", { "markers": ["!"] }],
"yoda": "error", "yoda": "error",
"prefer-destructuring": ["error", { "object": true, "array": false }], "prefer-destructuring": ["error", { "object": true, "array": false }],
"operator-assignment": ["error", "always"], "operator-assignment": ["error", "always"],

View file

@ -13,7 +13,8 @@ export const commonOpts = {
bundle: true, bundle: true,
watch, watch,
minify: !watch, minify: !watch,
sourcemap: watch ? "inline" : "" sourcemap: watch ? "inline" : "",
legalComments: "linked"
}; };
// https://github.com/evanw/esbuild/issues/619#issuecomment-751995294 // https://github.com/evanw/esbuild/issues/619#issuecomment-751995294
@ -23,7 +24,7 @@ export const commonOpts = {
export const makeAllPackagesExternalPlugin = { export const makeAllPackagesExternalPlugin = {
name: "make-all-packages-external", name: "make-all-packages-external",
setup(build) { setup(build) {
let filter = /^[^.\/]|^\.[^.\/]|^\.\.[^\/]/; // Must not start with "/" or "./" or "../" const filter = /^[^./]|^\.[^./]|^\.\.[^/]/; // Must not start with "/" or "./" or "../"
build.onResolve({ filter }, args => ({ path: args.path, external: true })); build.onResolve({ filter }, args => ({ path: args.path, external: true }));
}, },
}; };

View file

@ -4,7 +4,8 @@
// I would usually not add my own Copyright for such a small modification // I would usually not add my own Copyright for such a small modification
// but the Apache License requires this. // but the Apache License requires this.
/* /*!
* idb-keyval v6.2.0
* Copyright 2016, Jake Archibald * Copyright 2016, Jake Archibald
* Copyright 2022, Vendicated * Copyright 2022, Vendicated
* *