From 8ff0960c7a8b8091995147e9bd87d8bcf3cf1f37 Mon Sep 17 00:00:00 2001 From: Jonghakseo Date: Mon, 18 Apr 2022 08:09:16 +0900 Subject: [PATCH 1/8] fix: build code --- package.json | 3 +- plugins/copy-template.ts | 33 -- plugins/utils/check-called.ts | 15 - public/devtools.html | 9 - public/newtab.html | 11 - public/options.html | 11 - public/panel.html | 11 - public/popup.html | 11 - src/manifest.ts | 18 +- src/pages/Devtools/index.html | 9 - src/pages/{Background => background}/index.ts | 0 src/pages/{Content => content}/index.ts | 1 + .../content.style.css => content/style.css} | 0 src/pages/devtools/index.html | 10 + src/pages/{Devtools => devtools}/index.ts | 0 src/pages/{Newtab => newtab}/Newtab.css | 0 src/pages/{Newtab => newtab}/Newtab.scss | 0 src/pages/{Newtab => newtab}/Newtab.tsx | 4 +- src/pages/{Newtab => newtab}/index.css | 0 src/pages/{Newtab => newtab}/index.html | 1 + src/pages/{Newtab => newtab}/index.tsx | 4 +- src/pages/{Options => options}/Options.css | 0 src/pages/{Options => options}/Options.tsx | 2 +- src/pages/{Options => options}/index.css | 0 src/pages/{Options => options}/index.html | 1 + src/pages/{Options => options}/index.tsx | 4 +- src/pages/{Panel => panel}/Panel.css | 0 src/pages/{Panel => panel}/Panel.tsx | 2 +- src/pages/{Panel => panel}/index.css | 0 src/pages/{Panel => panel}/index.html | 1 + src/pages/{Panel => panel}/index.tsx | 4 +- src/pages/{Popup => popup}/Popup.css | 0 src/pages/{Popup => popup}/Popup.tsx | 2 +- src/pages/{Popup => popup}/index.css | 0 src/pages/{Popup => popup}/index.html | 1 + src/pages/{Popup => popup}/index.tsx | 4 +- vite.config.ts | 54 +--- yarn.lock | 281 +----------------- 38 files changed, 53 insertions(+), 454 deletions(-) delete mode 100644 plugins/copy-template.ts delete mode 100644 plugins/utils/check-called.ts delete mode 100644 public/devtools.html delete mode 100644 public/newtab.html delete mode 100644 public/options.html delete mode 100644 public/panel.html delete mode 100644 public/popup.html delete mode 100644 src/pages/Devtools/index.html rename src/pages/{Background => background}/index.ts (100%) rename src/pages/{Content => content}/index.ts (58%) rename src/pages/{Content/content.style.css => content/style.css} (100%) create mode 100644 src/pages/devtools/index.html rename src/pages/{Devtools => devtools}/index.ts (100%) rename src/pages/{Newtab => newtab}/Newtab.css (100%) rename src/pages/{Newtab => newtab}/Newtab.scss (100%) rename src/pages/{Newtab => newtab}/Newtab.tsx (90%) rename src/pages/{Newtab => newtab}/index.css (100%) rename src/pages/{Newtab => newtab}/index.html (76%) rename src/pages/{Newtab => newtab}/index.tsx (80%) rename src/pages/{Options => options}/Options.css (100%) rename src/pages/{Options => options}/Options.tsx (80%) rename src/pages/{Options => options}/index.css (100%) rename src/pages/{Options => options}/index.html (76%) rename src/pages/{Options => options}/index.tsx (79%) rename src/pages/{Panel => panel}/Panel.css (100%) rename src/pages/{Panel => panel}/Panel.tsx (84%) rename src/pages/{Panel => panel}/index.css (100%) rename src/pages/{Panel => panel}/index.html (76%) rename src/pages/{Panel => panel}/index.tsx (81%) rename src/pages/{Popup => popup}/Popup.css (100%) rename src/pages/{Popup => popup}/Popup.tsx (94%) rename src/pages/{Popup => popup}/index.css (100%) rename src/pages/{Popup => popup}/index.html (75%) rename src/pages/{Popup => popup}/index.tsx (81%) diff --git a/package.json b/package.json index a1d20ce27..1f319882c 100755 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "ts-loader": "^9.2.6", "ts-node": "^10.7.0", "typescript": "^4.5.5", - "vite": "^2.9.1", - "vite-plugin-html": "^3.2.0" + "vite": "^2.9.1" } } diff --git a/plugins/copy-template.ts b/plugins/copy-template.ts deleted file mode 100644 index a050feb37..000000000 --- a/plugins/copy-template.ts +++ /dev/null @@ -1,33 +0,0 @@ -import * as fs from "fs"; -import * as path from "path"; -import colorLog from "./utils/color-log"; -import checkCalled from "./utils/check-called"; - -const { resolve } = path; - -const publicDir = resolve(__dirname, "../public"); -const pagesDir = resolve(__dirname, "../src/pages"); - -const folders = ["Newtab", "Panel", "Devtools", "Options", "Popup"]; - -export default function copyTemplate() { - const checker = checkCalled(); - return { - name: "copy-template", - buildStart() { - if (checker.isCalled()) { - return; - } - - folders.forEach((folder) => { - const from = resolve(pagesDir, folder, "index.html"); - const to = resolve(publicDir, `${folder.toLowerCase()}.html`); - - fs.copyFileSync(from, to); - colorLog(`Template file copy complete: ${to}`, "success"); - }); - - checker.call(); - }, - }; -} diff --git a/plugins/utils/check-called.ts b/plugins/utils/check-called.ts deleted file mode 100644 index 56b7c1160..000000000 --- a/plugins/utils/check-called.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Checker that the plugin is called only once at build time - * 플러그인 호출시 한 번만 호출되도록 체크하는 역할을 한다 - */ -export default function checkCalled() { - let _isCalled = false; - return { - isCalled() { - return _isCalled; - }, - call() { - _isCalled = true; - }, - }; -} diff --git a/public/devtools.html b/public/devtools.html deleted file mode 100644 index 5050e8e3f..000000000 --- a/public/devtools.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/public/newtab.html b/public/newtab.html deleted file mode 100644 index b87f7d846..000000000 --- a/public/newtab.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - New tab - - - -
- - diff --git a/public/options.html b/public/options.html deleted file mode 100644 index ff1415b53..000000000 --- a/public/options.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Options - - - -
- - diff --git a/public/panel.html b/public/panel.html deleted file mode 100644 index 1677255f9..000000000 --- a/public/panel.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Devtools Panel - - - -
- - diff --git a/public/popup.html b/public/popup.html deleted file mode 100644 index 6ff70d712..000000000 --- a/public/popup.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Popup - - - -
- - diff --git a/src/manifest.ts b/src/manifest.ts index 8bbecb93f..2a59c42ef 100755 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -6,14 +6,14 @@ const manifest: ManifestType = { name: packageJson.name, version: packageJson.version, description: packageJson.description, - options_page: "options.html", + options_page: "src/pages/options/index.html", background: { service_worker: "background.js" }, action: { - default_popup: "popup.html", + default_popup: "src/pages/popup/index.html", default_icon: "icon-34.png", }, chrome_url_overrides: { - newtab: "newtab.html", + newtab: "src/pages/newtab/index.html", }, icons: { "128": "icon-128.png", @@ -21,14 +21,18 @@ const manifest: ManifestType = { content_scripts: [ { matches: ["http://*/*", "https://*/*", ""], - js: ["content.js"], - css: ["content.styles.css"], + js: ["src/pages/content/index.js"], + css: ["src/pages/content/styles.css"], }, ], - devtools_page: "devtools.html", + devtools_page: "src/pages/devtools/index.html", web_accessible_resources: [ { - resources: ["content.styles.css", "icon-128.png", "icon-34.png"], + resources: [ + "src/pages/content/styles.css", + "icon-128.png", + "icon-34.png", + ], matches: [], }, ], diff --git a/src/pages/Devtools/index.html b/src/pages/Devtools/index.html deleted file mode 100644 index 5050e8e3f..000000000 --- a/src/pages/Devtools/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/src/pages/Background/index.ts b/src/pages/background/index.ts similarity index 100% rename from src/pages/Background/index.ts rename to src/pages/background/index.ts diff --git a/src/pages/Content/index.ts b/src/pages/content/index.ts similarity index 58% rename from src/pages/Content/index.ts rename to src/pages/content/index.ts index fb325da02..0a48176da 100644 --- a/src/pages/Content/index.ts +++ b/src/pages/content/index.ts @@ -1 +1,2 @@ +import "./style.css"; console.log("content loaded"); diff --git a/src/pages/Content/content.style.css b/src/pages/content/style.css similarity index 100% rename from src/pages/Content/content.style.css rename to src/pages/content/style.css diff --git a/src/pages/devtools/index.html b/src/pages/devtools/index.html new file mode 100644 index 000000000..07361f4ef --- /dev/null +++ b/src/pages/devtools/index.html @@ -0,0 +1,10 @@ + + + + + Devtools + + + + + diff --git a/src/pages/Devtools/index.ts b/src/pages/devtools/index.ts similarity index 100% rename from src/pages/Devtools/index.ts rename to src/pages/devtools/index.ts diff --git a/src/pages/Newtab/Newtab.css b/src/pages/newtab/Newtab.css similarity index 100% rename from src/pages/Newtab/Newtab.css rename to src/pages/newtab/Newtab.css diff --git a/src/pages/Newtab/Newtab.scss b/src/pages/newtab/Newtab.scss similarity index 100% rename from src/pages/Newtab/Newtab.scss rename to src/pages/newtab/Newtab.scss diff --git a/src/pages/Newtab/Newtab.tsx b/src/pages/newtab/Newtab.tsx similarity index 90% rename from src/pages/Newtab/Newtab.tsx rename to src/pages/newtab/Newtab.tsx index 11b510dd1..db04b67b4 100644 --- a/src/pages/Newtab/Newtab.tsx +++ b/src/pages/newtab/Newtab.tsx @@ -1,7 +1,7 @@ import React from "react"; import logo from "@assets/img/logo.svg"; -import "@pages/Newtab/Newtab.css"; -import "@pages/Newtab/Newtab.scss"; +import "@pages/newtab/Newtab.css"; +import "@pages/newtab/Newtab.scss"; const Newtab = () => { return ( diff --git a/src/pages/Newtab/index.css b/src/pages/newtab/index.css similarity index 100% rename from src/pages/Newtab/index.css rename to src/pages/newtab/index.css diff --git a/src/pages/Newtab/index.html b/src/pages/newtab/index.html similarity index 76% rename from src/pages/Newtab/index.html rename to src/pages/newtab/index.html index b87f7d846..0d5481bab 100644 --- a/src/pages/Newtab/index.html +++ b/src/pages/newtab/index.html @@ -7,5 +7,6 @@
+ diff --git a/src/pages/Newtab/index.tsx b/src/pages/newtab/index.tsx similarity index 80% rename from src/pages/Newtab/index.tsx rename to src/pages/newtab/index.tsx index 102ebd09b..de1083670 100644 --- a/src/pages/Newtab/index.tsx +++ b/src/pages/newtab/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { createRoot } from "react-dom/client"; -import Newtab from "@pages/Newtab/Newtab"; -import "@pages/Newtab/index.css"; +import Newtab from "@pages/newtab/Newtab"; +import "@pages/newtab/index.css"; function init() { const appContainer = document.querySelector("#app-container"); diff --git a/src/pages/Options/Options.css b/src/pages/options/Options.css similarity index 100% rename from src/pages/Options/Options.css rename to src/pages/options/Options.css diff --git a/src/pages/Options/Options.tsx b/src/pages/options/Options.tsx similarity index 80% rename from src/pages/Options/Options.tsx rename to src/pages/options/Options.tsx index da861fe41..28d8fe965 100644 --- a/src/pages/Options/Options.tsx +++ b/src/pages/options/Options.tsx @@ -1,5 +1,5 @@ import React from "react"; -import "@pages/Options/Options.css"; +import "@pages/options/Options.css"; const Options: React.FC = () => { return
Options
; diff --git a/src/pages/Options/index.css b/src/pages/options/index.css similarity index 100% rename from src/pages/Options/index.css rename to src/pages/options/index.css diff --git a/src/pages/Options/index.html b/src/pages/options/index.html similarity index 76% rename from src/pages/Options/index.html rename to src/pages/options/index.html index ff1415b53..2f6cc0823 100644 --- a/src/pages/Options/index.html +++ b/src/pages/options/index.html @@ -7,5 +7,6 @@
+ diff --git a/src/pages/Options/index.tsx b/src/pages/options/index.tsx similarity index 79% rename from src/pages/Options/index.tsx rename to src/pages/options/index.tsx index 7ee5c39b3..93d283f80 100644 --- a/src/pages/Options/index.tsx +++ b/src/pages/options/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { createRoot } from "react-dom/client"; -import Options from "@pages/Options/Options"; -import "@pages/Options/index.css"; +import Options from "@pages/options/Options"; +import "@pages/options/index.css"; function init() { const appContainer = document.querySelector("#app-container"); diff --git a/src/pages/Panel/Panel.css b/src/pages/panel/Panel.css similarity index 100% rename from src/pages/Panel/Panel.css rename to src/pages/panel/Panel.css diff --git a/src/pages/Panel/Panel.tsx b/src/pages/panel/Panel.tsx similarity index 84% rename from src/pages/Panel/Panel.tsx rename to src/pages/panel/Panel.tsx index 94a55818c..4c476f062 100644 --- a/src/pages/Panel/Panel.tsx +++ b/src/pages/panel/Panel.tsx @@ -1,5 +1,5 @@ import React from "react"; -import "@pages/Panel/Panel.css"; +import "@pages/panel/Panel.css"; const Panel: React.FC = () => { return ( diff --git a/src/pages/Panel/index.css b/src/pages/panel/index.css similarity index 100% rename from src/pages/Panel/index.css rename to src/pages/panel/index.css diff --git a/src/pages/Panel/index.html b/src/pages/panel/index.html similarity index 76% rename from src/pages/Panel/index.html rename to src/pages/panel/index.html index 1677255f9..f3d2052c2 100644 --- a/src/pages/Panel/index.html +++ b/src/pages/panel/index.html @@ -7,5 +7,6 @@
+ diff --git a/src/pages/Panel/index.tsx b/src/pages/panel/index.tsx similarity index 81% rename from src/pages/Panel/index.tsx rename to src/pages/panel/index.tsx index e5c08a7a1..94c402e18 100644 --- a/src/pages/Panel/index.tsx +++ b/src/pages/panel/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { createRoot } from "react-dom/client"; -import Panel from "@pages/Panel/Panel"; -import "@pages/Panel/index.css"; +import Panel from "@pages/panel/Panel"; +import "@pages/panel/index.css"; function init() { const appContainer = document.querySelector("#app-container"); diff --git a/src/pages/Popup/Popup.css b/src/pages/popup/Popup.css similarity index 100% rename from src/pages/Popup/Popup.css rename to src/pages/popup/Popup.css diff --git a/src/pages/Popup/Popup.tsx b/src/pages/popup/Popup.tsx similarity index 94% rename from src/pages/Popup/Popup.tsx rename to src/pages/popup/Popup.tsx index 6fb0876ae..63e861c68 100644 --- a/src/pages/Popup/Popup.tsx +++ b/src/pages/popup/Popup.tsx @@ -1,6 +1,6 @@ import React from "react"; import logo from "@assets/img/logo.svg"; -import "@pages/Popup/Popup.css"; +import "@pages/popup/Popup.css"; const Popup = () => { return ( diff --git a/src/pages/Popup/index.css b/src/pages/popup/index.css similarity index 100% rename from src/pages/Popup/index.css rename to src/pages/popup/index.css diff --git a/src/pages/Popup/index.html b/src/pages/popup/index.html similarity index 75% rename from src/pages/Popup/index.html rename to src/pages/popup/index.html index 6ff70d712..887788a66 100644 --- a/src/pages/Popup/index.html +++ b/src/pages/popup/index.html @@ -7,5 +7,6 @@
+ diff --git a/src/pages/Popup/index.tsx b/src/pages/popup/index.tsx similarity index 81% rename from src/pages/Popup/index.tsx rename to src/pages/popup/index.tsx index 02fc0dbcb..a16fa22e3 100644 --- a/src/pages/Popup/index.tsx +++ b/src/pages/popup/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import { createRoot } from "react-dom/client"; -import "@pages/Popup/index.css"; -import Popup from "@pages/Popup/Popup"; +import "@pages/popup/index.css"; +import Popup from "@pages/popup/Popup"; function init() { const appContainer = document.querySelector("#app-container"); diff --git a/vite.config.ts b/vite.config.ts index 79faab0d6..62d08510f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,8 +1,6 @@ -import { defineConfig, PluginOption } from "vite"; +import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import { resolve } from "path"; -import { createHtmlPlugin } from "vite-plugin-html"; -import copyTemplate from "./plugins/copy-template"; import makeManifest from "./plugins/make-manifest"; const root = resolve(__dirname, "src"); @@ -11,8 +9,6 @@ const assetsDir = resolve(root, "assets"); const outDir = resolve(__dirname, "dist"); const publicDir = resolve(__dirname, "public"); -const customPlugins: PluginOption[] = [copyTemplate(), makeManifest()]; - export default defineConfig({ resolve: { alias: { @@ -21,53 +17,21 @@ export default defineConfig({ "@pages": pagesDir, }, }, - plugins: [ - react(), - ...customPlugins, - createHtmlPlugin({ - pages: [ - { - entry: resolve(pagesDir, "Newtab", "index.tsx"), - filename: "newtab.js", - template: "public/newtab.html", - }, - { - entry: resolve(pagesDir, "Options", "index.tsx"), - filename: "options.js", - template: "public/options.html", - }, - { - entry: resolve(pagesDir, "Panel", "index.tsx"), - filename: "panel.js", - template: "public/panel.html", - }, - { - entry: resolve(pagesDir, "Popup", "index.tsx"), - filename: "popup.js", - template: "public/popup.html", - }, - ], - }), - ], + plugins: [react(), makeManifest()], publicDir, build: { outDir, rollupOptions: { input: { - // css - contentStyle: resolve(pagesDir, "Content", "content.style.css"), - // ts - devtools: resolve(pagesDir, "Devtools", "index.ts"), - content: resolve(pagesDir, "Content", "index.ts"), - background: resolve(pagesDir, "Background", "index.ts"), + devtools: resolve(pagesDir, "devtools", "index.ts"), + content: resolve(pagesDir, "content", "index.ts"), + background: resolve(pagesDir, "background", "index.ts"), + popup: resolve(pagesDir, "popup", "index.html"), + newtab: resolve(pagesDir, "newtab", "index.html"), + options: resolve(pagesDir, "options", "index.html"), }, output: { - entryFileNames: (chunk) => { - if (chunk.name === "contentStyle") { - return `content.styles.css`; - } - return `${chunk.name}.js`; - }, + entryFileNames: (chunk) => `src/pages/${chunk.name}/index.js`, }, external: ["chrome"], }, diff --git a/yarn.lock b/yarn.lock index 5e1d45b60..0f16ec43d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -545,7 +545,7 @@ acorn-walk@^8.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^8.4.1, acorn@^8.5.0, acorn@^8.7.0: +acorn@^8.4.1, acorn@^8.7.0: version "8.7.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== @@ -651,11 +651,6 @@ ast-types-flow@^0.0.7: resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" integrity sha1-9wtzXGvKGlycItmCw+Oef+ujva0= -async@0.9.x: - version "0.9.2" - resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" - integrity sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0= - axe-core@^4.3.5: version "4.4.1" resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.4.1.tgz#7dbdc25989298f9ad006645cd396782443757413" @@ -676,11 +671,6 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -boolbase@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= - boxen@^5.0.0: version "5.1.2" resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.1.2.tgz#788cb686fc83c1f486dfa8a40c68fc2b831d2b50" @@ -721,11 +711,6 @@ browserslist@^4.17.5: node-releases "^2.0.2" picocolors "^1.0.0" -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - cacheable-request@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" @@ -752,14 +737,6 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camel-case@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" - integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== - dependencies: - pascal-case "^3.1.2" - tslib "^2.0.3" - camelcase@^6.2.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" @@ -779,7 +756,7 @@ chalk@^2.0.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0: +chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -807,13 +784,6 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -clean-css@^5.2.2: - version "5.3.0" - resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.0.tgz#ad3d8238d5f3549e83d5f87205189494bc7cbb59" - integrity sha512-YYuuxv4H/iNb1Z/5IbMRoxgrzjWGhOEFfd+groZ5dMCVkpENiMZmwspdrzBo9286JjM1gZJPAyL7ZIdzuvu2AQ== - dependencies: - source-map "~0.6.0" - cli-boxes@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" @@ -850,21 +820,6 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colorette@^2.0.16: - version "2.0.16" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" - integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== - -commander@^2.20.0: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commander@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" - integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -882,16 +837,6 @@ configstore@^5.0.1: write-file-atomic "^3.0.0" xdg-basedir "^4.0.0" -connect-history-api-fallback@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" - integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== - -consola@^2.15.3: - version "2.15.3" - resolved "https://registry.yarnpkg.com/consola/-/consola-2.15.3.tgz#2e11f98d6a4be71ff72e0bdf07bd23e12cb61550" - integrity sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw== - convert-source-map@^1.7.0: version "1.8.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" @@ -923,22 +868,6 @@ crypto-random-string@^2.0.0: resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== -css-select@^4.2.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" - integrity sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ== - dependencies: - boolbase "^1.0.0" - css-what "^6.0.1" - domhandler "^4.3.1" - domutils "^2.8.0" - nth-check "^2.0.1" - -css-what@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" - integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== - csstype@^3.0.2: version "3.0.11" resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.11.tgz#d66700c5eacfac1940deb4e3ee5642792d85cd33" @@ -1025,44 +954,6 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dom-serializer@^1.0.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.2.tgz#6206437d32ceefaec7161803230c7a20bc1b4d91" - integrity sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.2.0" - entities "^2.0.0" - -domelementtype@^2.0.1, domelementtype@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - -domhandler@^4.2.0, domhandler@^4.3.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" - integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== - dependencies: - domelementtype "^2.2.0" - -domutils@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" - integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== - dependencies: - dom-serializer "^1.0.1" - domelementtype "^2.2.0" - domhandler "^4.2.0" - -dot-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" - integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - dot-prop@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" @@ -1070,28 +961,11 @@ dot-prop@^5.2.0: dependencies: is-obj "^2.0.0" -dotenv-expand@^8.0.2: - version "8.0.3" - resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-8.0.3.tgz#29016757455bcc748469c83a19b36aaf2b83dd6e" - integrity sha512-SErOMvge0ZUyWd5B0NXMQlDkN+8r+HhVUsxgOO7IoPDOdDRD2JjExpN6y3KnFR66jsJMwSn1pqIivhU5rcJiNg== - -dotenv@^16.0.0: - version "16.0.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.0.tgz#c619001253be89ebb638d027b609c75c26e47411" - integrity sha512-qD9WU0MPM4SWLPJy/r2Be+2WgQj8plChsyrCNQzW/0WjvcJQiKQJ9mH3ZgB3fxbUUxgc/11ZJ0Fi5KiimWGz2Q== - duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= -ejs@^3.1.6: - version "3.1.6" - resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.6.tgz#5bfd0a0689743bb5268b3550cceeebbc1702822a" - integrity sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw== - dependencies: - jake "^10.6.1" - electron-to-chromium@^1.4.84: version "1.4.106" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.106.tgz#e7a3bfa9d745dd9b9e597616cb17283cc349781a" @@ -1122,11 +996,6 @@ enhanced-resolve@^5.0.0: graceful-fs "^4.2.4" tapable "^2.2.0" -entities@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" - integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== - es-abstract@^1.19.0, es-abstract@^1.19.1: version "1.19.2" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.2.tgz#8f7b696d8f15b167ae3640b4060670f3d054143f" @@ -1525,7 +1394,7 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== -fast-glob@^3.2.11, fast-glob@^3.2.9: +fast-glob@^3.2.9: version "3.2.11" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== @@ -1560,13 +1429,6 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" -filelist@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.2.tgz#80202f21462d4d1c2e214119b1807c1bc0380e5b" - integrity sha512-z7O0IS8Plc39rTCq6i6iHxk43duYOn8uFJiWSewIq0Bww1RNybVHSCjahmcC87ZqAm4OTvFzlzeGu3XAzG1ctQ== - dependencies: - minimatch "^3.0.4" - fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -1594,7 +1456,7 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3" integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg== -fs-extra@^10.0.0, fs-extra@^10.0.1: +fs-extra@^10.0.0: version "10.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.1.tgz#27de43b4320e833f6867cc044bfce29fdf0ef3b8" integrity sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag== @@ -1777,24 +1639,6 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -he@1.2.0, he@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -html-minifier-terser@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz#bfc818934cc07918f6b3669f5774ecdfd48f32ab" - integrity sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw== - dependencies: - camel-case "^4.1.2" - clean-css "^5.2.2" - commander "^8.3.0" - he "^1.2.0" - param-case "^3.0.4" - relateurl "^0.2.7" - terser "^5.10.0" - http-cache-semantics@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" @@ -2021,16 +1865,6 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= -jake@^10.6.1: - version "10.8.4" - resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.4.tgz#f6a8b7bf90c6306f768aa82bb7b98bf4ca15e84a" - integrity sha512-MtWeTkl1qGsWUtbl/Jsca/8xSoK3x0UmS82sNbjqxxG/de/M/3b1DntdjHgPMC50enlTNwXOCRqPXLLt5cCfZA== - dependencies: - async "0.9.x" - chalk "^4.0.2" - filelist "^1.0.1" - minimatch "^3.0.4" - "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -2146,13 +1980,6 @@ loose-envify@^1.1.0, loose-envify@^1.4.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" -lower-case@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" - integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== - dependencies: - tslib "^2.0.3" - lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" @@ -2235,22 +2062,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= -no-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" - integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== - dependencies: - lower-case "^2.0.2" - tslib "^2.0.3" - -node-html-parser@^5.3.3: - version "5.3.3" - resolved "https://registry.yarnpkg.com/node-html-parser/-/node-html-parser-5.3.3.tgz#2845704f3a7331a610e0e551bf5fa02b266341b6" - integrity sha512-ncg1033CaX9UexbyA7e1N0aAoAYRDiV8jkTvzEnfd1GDvzFdrsXLzR4p4ik8mwLgnaKP/jyUFWDy9q3jvRT2Jw== - dependencies: - css-select "^4.2.1" - he "1.2.0" - node-releases@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.2.tgz#7139fe71e2f4f11b47d4d2986aaf8c48699e0c01" @@ -2289,13 +2100,6 @@ normalize-url@^4.1.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== -nth-check@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.1.tgz#2efe162f5c3da06a28959fbd3db75dbeea9f0fc2" - integrity sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w== - dependencies: - boolbase "^1.0.0" - object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -2409,14 +2213,6 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" -param-case@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" - integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== - dependencies: - dot-case "^3.0.4" - tslib "^2.0.3" - parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -2424,14 +2220,6 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -pascal-case@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" - integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== - dependencies: - no-case "^3.0.4" - tslib "^2.0.3" - path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -2457,11 +2245,6 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pathe@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/pathe/-/pathe-0.2.0.tgz#30fd7bbe0a0d91f0e60bae621f5d19e9e225c339" - integrity sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw== - picocolors@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" @@ -2616,11 +2399,6 @@ registry-url@^5.0.0: dependencies: rc "^1.2.8" -relateurl@^0.2.7: - version "0.2.7" - resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" - integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= - resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -2757,29 +2535,11 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== -source-map-support@~0.5.20: - version "0.5.21" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - source-map@^0.5.0: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= -source-map@^0.6.0, source-map@~0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@~0.7.2: - version "0.7.3" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" - integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== - string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.2: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -2865,16 +2625,6 @@ tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== -terser@^5.10.0: - version "5.12.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.12.1.tgz#4cf2ebed1f5bceef5c83b9f60104ac4a78b49e9c" - integrity sha512-NXbs+7nisos5E+yXwAD+y7zrcTkMqb0dEJxIGtSKPdCBzopf7ni4odPul2aechpV7EXNvOudYOX2bb5tln1jbQ== - dependencies: - acorn "^8.5.0" - commander "^2.20.0" - source-map "~0.7.2" - source-map-support "~0.5.20" - text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -2948,11 +2698,6 @@ tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.3: - version "2.3.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== - tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -3055,24 +2800,6 @@ v8-compile-cache@^2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== -vite-plugin-html@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/vite-plugin-html/-/vite-plugin-html-3.2.0.tgz#0d4df9900642a321a139f1c25c05195ba9d0ec79" - integrity sha512-2VLCeDiHmV/BqqNn5h2V+4280KRgQzCFN47cst3WiNK848klESPQnzuC3okH5XHtgwHH/6s1Ho/YV6yIO0pgoQ== - dependencies: - "@rollup/pluginutils" "^4.2.0" - colorette "^2.0.16" - connect-history-api-fallback "^1.6.0" - consola "^2.15.3" - dotenv "^16.0.0" - dotenv-expand "^8.0.2" - ejs "^3.1.6" - fast-glob "^3.2.11" - fs-extra "^10.0.1" - html-minifier-terser "^6.1.0" - node-html-parser "^5.3.3" - pathe "^0.2.0" - vite@^2.9.1: version "2.9.1" resolved "https://registry.yarnpkg.com/vite/-/vite-2.9.1.tgz#84bce95fae210a7beb566a0af06246748066b48f" From e27e14366519407fc2caf80948d745e6d1be5d64 Mon Sep 17 00:00:00 2001 From: Jonghakseo Date: Mon, 18 Apr 2022 08:48:01 +0900 Subject: [PATCH 2/8] edit: config --- .eslintrc | 2 +- nodemon.json | 5 +-- src/chrome.d.ts | 6 --- src/{assets/index.d.ts => global.d.ts} | 6 +++ src/manifest.ts | 10 ++--- src/pages/newtab/Newtab.tsx | 2 +- src/pages/popup/Popup.tsx | 2 +- tsconfig.json | 3 +- plugins/utils/color-log.ts => utils/log.ts | 0 {plugins => utils/plugins}/make-manifest.ts | 7 ++-- utils/public/manifest.json | 46 +++++++++++++++++++++ vite.config.ts | 11 +++-- 12 files changed, 74 insertions(+), 26 deletions(-) delete mode 100644 src/chrome.d.ts rename src/{assets/index.d.ts => global.d.ts} (83%) rename plugins/utils/color-log.ts => utils/log.ts (100%) rename {plugins => utils/plugins}/make-manifest.ts (74%) create mode 100644 utils/public/manifest.json diff --git a/.eslintrc b/.eslintrc index 1c4e9b009..5eb1d43d2 100644 --- a/.eslintrc +++ b/.eslintrc @@ -25,5 +25,5 @@ "globals": { "chrome": "readonly" }, - "ignorePatterns": ["watch.js"] + "ignorePatterns": ["watch.js", "dist/**"] } diff --git a/nodemon.json b/nodemon.json index 5eeae5104..7ce40ea3a 100644 --- a/nodemon.json +++ b/nodemon.json @@ -1,11 +1,10 @@ { "watch": [ - "src" + "src", "utils", "vite.config.ts" ], "ext": "tsx,css,html,ts", "ignore": [ "src/**/*.spec.ts" ], - "exec": "vite build", - "delay": 300 + "exec": "vite build" } diff --git a/src/chrome.d.ts b/src/chrome.d.ts deleted file mode 100644 index 2e017c735..000000000 --- a/src/chrome.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import Chrome from "chrome" - -declare namespace chrome { - export default Chrome -} - diff --git a/src/assets/index.d.ts b/src/global.d.ts similarity index 83% rename from src/assets/index.d.ts rename to src/global.d.ts index 7777bd0cf..e96ead328 100644 --- a/src/assets/index.d.ts +++ b/src/global.d.ts @@ -1,3 +1,9 @@ +import Chrome from "chrome"; + +declare namespace chrome { + export default Chrome; +} + declare module "*.svg" { import React = require("react"); export const ReactComponent: React.SFC>; diff --git a/src/manifest.ts b/src/manifest.ts index 2a59c42ef..fbb790361 100755 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -7,7 +7,7 @@ const manifest: ManifestType = { version: packageJson.version, description: packageJson.description, options_page: "src/pages/options/index.html", - background: { service_worker: "background.js" }, + background: { service_worker: "src/pages/background/index.js" }, action: { default_popup: "src/pages/popup/index.html", default_icon: "icon-34.png", @@ -22,17 +22,13 @@ const manifest: ManifestType = { { matches: ["http://*/*", "https://*/*", ""], js: ["src/pages/content/index.js"], - css: ["src/pages/content/styles.css"], + css: ["src/pages/content/style.css"], }, ], devtools_page: "src/pages/devtools/index.html", web_accessible_resources: [ { - resources: [ - "src/pages/content/styles.css", - "icon-128.png", - "icon-34.png", - ], + resources: ["src/pages/content/style.css", "icon-128.png", "icon-34.png"], matches: [], }, ], diff --git a/src/pages/newtab/Newtab.tsx b/src/pages/newtab/Newtab.tsx index db04b67b4..b63a57ff0 100644 --- a/src/pages/newtab/Newtab.tsx +++ b/src/pages/newtab/Newtab.tsx @@ -9,7 +9,7 @@ const Newtab = () => {
logo

- Edit src/pages/Newtab/Newtab.tsx and save to reload. + Edit src/pages/newtab/Newtab.tsx and save to reload.

{
logo

- Edit src/pages/Popup/Popup.jsx and save to reload. + Edit src/pages/popup/Popup.jsx and save to reload.

" + ], + "js": [ + "src/pages/content/index.js" + ], + "css": [ + "src/pages/content/style.css" + ] + } + ], + "devtools_page": "src/pages/devtools/index.html", + "web_accessible_resources": [ + { + "resources": [ + "src/pages/content/style.css", + "icon-128.png", + "icon-34.png" + ], + "matches": [] + } + ] +} \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 62d08510f..a9e5bfb65 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import { resolve } from "path"; -import makeManifest from "./plugins/make-manifest"; +import makeManifest from "./utils/plugins/make-manifest"; const root = resolve(__dirname, "src"); const pagesDir = resolve(root, "pages"); @@ -25,15 +25,20 @@ export default defineConfig({ input: { devtools: resolve(pagesDir, "devtools", "index.ts"), content: resolve(pagesDir, "content", "index.ts"), + contentStyle: resolve(pagesDir, "content", "style.css"), background: resolve(pagesDir, "background", "index.ts"), popup: resolve(pagesDir, "popup", "index.html"), newtab: resolve(pagesDir, "newtab", "index.html"), options: resolve(pagesDir, "options", "index.html"), }, output: { - entryFileNames: (chunk) => `src/pages/${chunk.name}/index.js`, + entryFileNames: (chunk) => { + if (chunk.name === "contentStyle") { + return `src/pages/content/style.css`; + } + return `src/pages/${chunk.name}/index.js`; + }, }, - external: ["chrome"], }, }, }); From f3824c763c3719d7bba5ee8af604275a2d50812d Mon Sep 17 00:00:00 2001 From: Jonghakseo Date: Mon, 18 Apr 2022 08:50:29 +0900 Subject: [PATCH 3/8] on push --- .github/workflows/stale.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index dc90e5a1c..797b58df6 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,3 +1,4 @@ +on: push # Number of days of inactivity before an issue becomes stale daysUntilStale: 60 # Number of days of inactivity before a stale issue is closed From 715739d8fceb9435f467a5bbe2b18d56b92618fb Mon Sep 17 00:00:00 2001 From: Jonghakseo Date: Mon, 18 Apr 2022 08:51:49 +0900 Subject: [PATCH 4/8] remove stale --- .github/workflows/stale.yml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 797b58df6..000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,18 +0,0 @@ -on: push -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 60 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 7 -# Issues with these labels will never be considered stale -exemptLabels: - - pinned - - security -# Label to use when marking an issue as stale -staleLabel: wontfix -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: false From 48ab055f3b9733f984ffeb80727b1849f6854946 Mon Sep 17 00:00:00 2001 From: Jonghakseo Date: Mon, 18 Apr 2022 08:54:29 +0900 Subject: [PATCH 5/8] fix: manifest path --- utils/plugins/make-manifest.ts | 2 +- utils/public/manifest.json | 46 ---------------------------------- 2 files changed, 1 insertion(+), 47 deletions(-) delete mode 100644 utils/public/manifest.json diff --git a/utils/plugins/make-manifest.ts b/utils/plugins/make-manifest.ts index afeb1772f..2b04a7ff5 100644 --- a/utils/plugins/make-manifest.ts +++ b/utils/plugins/make-manifest.ts @@ -6,7 +6,7 @@ import { PluginOption } from "vite"; const { resolve } = path; -const outDir = resolve(__dirname, "..", "public"); +const outDir = resolve(__dirname, "..", "..", "public"); export default function makeManifest(): PluginOption { return { diff --git a/utils/public/manifest.json b/utils/public/manifest.json deleted file mode 100644 index 1d4f3d254..000000000 --- a/utils/public/manifest.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "manifest_version": 3, - "name": "chrome-extension-boilerplate-react-vite", - "version": "0.0.1", - "description": "chrome extension boilerplate", - "options_page": "src/pages/options/index.html", - "background": { - "service_worker": "src/pages/background/index.js" - }, - "action": { - "default_popup": "src/pages/popup/index.html", - "default_icon": "icon-34.png" - }, - "chrome_url_overrides": { - "newtab": "src/pages/newtab/index.html" - }, - "icons": { - "128": "icon-128.png" - }, - "content_scripts": [ - { - "matches": [ - "http://*/*", - "https://*/*", - "" - ], - "js": [ - "src/pages/content/index.js" - ], - "css": [ - "src/pages/content/style.css" - ] - } - ], - "devtools_page": "src/pages/devtools/index.html", - "web_accessible_resources": [ - { - "resources": [ - "src/pages/content/style.css", - "icon-128.png", - "icon-34.png" - ], - "matches": [] - } - ] -} \ No newline at end of file From e20f18faf84aab0b621650197d427cb530375b8b Mon Sep 17 00:00:00 2001 From: JongHak Seo Date: Mon, 18 Apr 2022 09:29:11 +0900 Subject: [PATCH 6/8] Update README.md --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 02d70617a..730c254e7 100755 --- a/README.md +++ b/README.md @@ -19,7 +19,6 @@ - [Features](#features) - [Installation](#installation) - [Procedures](#procedures) -- [Attention](#attention) - [Screenshots](#screenshots) - [NewTab](#newtab) - [Popup](#popup) @@ -54,9 +53,6 @@ This boilerplate is made for creating chrome extensions using React and Typescri 5. Select - `dist` folder in this project (after dev or build) 6. If you want to build in production, Just run `yarn build` or `npm run build`. -## Attention -- Html files in the public folder are automatically copied from inside the `src/pages` folder. So, if you want to edit the html template file, edit index.html in each page folder. - ## Screenshots ### New Tab From 7606571b0b2930177a27482e637b7db3cac7cd70 Mon Sep 17 00:00:00 2001 From: Jonghakseo Date: Mon, 18 Apr 2022 18:43:48 +0900 Subject: [PATCH 7/8] fix: contentStyle --- .gitignore | 5 ++++- src/manifest.ts | 4 ++-- src/pages/content/index.ts | 7 +++++-- src/pages/content/style.css | 3 +++ src/pages/devtools/index.html | 2 +- src/pages/devtools/index.ts | 6 +++++- utils/plugins/copy-content-style.ts | 21 +++++++++++++++++++++ vite.config.ts | 13 +++++-------- 8 files changed, 46 insertions(+), 15 deletions(-) create mode 100644 utils/plugins/copy-content-style.ts diff --git a/.gitignore b/.gitignore index 05d8418e8..85812eea7 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,7 @@ .idea #generated manifest -public/manifest.json \ No newline at end of file +public/manifest.json + +#copied contentStyle +public/contentStyle.css \ No newline at end of file diff --git a/src/manifest.ts b/src/manifest.ts index fbb790361..b33d94985 100755 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -22,13 +22,13 @@ const manifest: ManifestType = { { matches: ["http://*/*", "https://*/*", ""], js: ["src/pages/content/index.js"], - css: ["src/pages/content/style.css"], + css: ["contentStyle.css"], }, ], devtools_page: "src/pages/devtools/index.html", web_accessible_resources: [ { - resources: ["src/pages/content/style.css", "icon-128.png", "icon-34.png"], + resources: ["contentStyle.css", "icon-128.png", "icon-34.png"], matches: [], }, ], diff --git a/src/pages/content/index.ts b/src/pages/content/index.ts index 0a48176da..063daabda 100644 --- a/src/pages/content/index.ts +++ b/src/pages/content/index.ts @@ -1,2 +1,5 @@ -import "./style.css"; -console.log("content loaded"); +try { + console.log("content loaded"); +} catch (e) { + console.error(e); +} diff --git a/src/pages/content/style.css b/src/pages/content/style.css index e69de29bb..ccae644bd 100644 --- a/src/pages/content/style.css +++ b/src/pages/content/style.css @@ -0,0 +1,3 @@ +p { + margin: inherit; +} \ No newline at end of file diff --git a/src/pages/devtools/index.html b/src/pages/devtools/index.html index 07361f4ef..a9e7f3a7d 100644 --- a/src/pages/devtools/index.html +++ b/src/pages/devtools/index.html @@ -5,6 +5,6 @@ Devtools - + diff --git a/src/pages/devtools/index.ts b/src/pages/devtools/index.ts index 24597e19b..46d8bada1 100644 --- a/src/pages/devtools/index.ts +++ b/src/pages/devtools/index.ts @@ -1,5 +1,9 @@ try { - chrome.devtools.panels.create("Dev Tools", "icon-34.png", "panel.html"); + chrome.devtools.panels.create( + "Dev Tools", + "icon-34.png", + "src/pages/panel/index.html" + ); } catch (e) { console.error(e); } diff --git a/utils/plugins/copy-content-style.ts b/utils/plugins/copy-content-style.ts new file mode 100644 index 000000000..6b0f846c7 --- /dev/null +++ b/utils/plugins/copy-content-style.ts @@ -0,0 +1,21 @@ +import * as fs from "fs"; +import * as path from "path"; +import colorLog from "../log"; +import { PluginOption } from "vite"; + +const { resolve } = path; + +const root = resolve(__dirname, "..", ".."); +const contentStyle = resolve(root, "src", "pages", "content", "style.css"); +const outDir = resolve(__dirname, "..", "..", "public"); + +export default function copyContentStyle(): PluginOption { + return { + name: "make-manifest", + buildEnd() { + fs.copyFileSync(contentStyle, resolve(outDir, "contentStyle.css")); + + colorLog(`contentStyle copied`, "success"); + }, + }; +} diff --git a/vite.config.ts b/vite.config.ts index a9e5bfb65..0045f55ca 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,6 +2,7 @@ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import { resolve } from "path"; import makeManifest from "./utils/plugins/make-manifest"; +import copyContentStyle from "./utils/plugins/copy-content-style"; const root = resolve(__dirname, "src"); const pagesDir = resolve(root, "pages"); @@ -17,13 +18,14 @@ export default defineConfig({ "@pages": pagesDir, }, }, - plugins: [react(), makeManifest()], + plugins: [react(), makeManifest(), copyContentStyle()], publicDir, build: { outDir, rollupOptions: { input: { - devtools: resolve(pagesDir, "devtools", "index.ts"), + devtools: resolve(pagesDir, "devtools", "index.html"), + panel: resolve(pagesDir, "panel", "index.html"), content: resolve(pagesDir, "content", "index.ts"), contentStyle: resolve(pagesDir, "content", "style.css"), background: resolve(pagesDir, "background", "index.ts"), @@ -32,12 +34,7 @@ export default defineConfig({ options: resolve(pagesDir, "options", "index.html"), }, output: { - entryFileNames: (chunk) => { - if (chunk.name === "contentStyle") { - return `src/pages/content/style.css`; - } - return `src/pages/${chunk.name}/index.js`; - }, + entryFileNames: (chunk) => `src/pages/${chunk.name}/index.js`, }, }, }, From 75563349067e0d69ab2a7faa4625b65ee1685b62 Mon Sep 17 00:00:00 2001 From: Jonghakseo Date: Mon, 18 Apr 2022 18:45:50 +0900 Subject: [PATCH 8/8] fix: unused code --- src/pages/content/style.css | 3 --- vite.config.ts | 1 - 2 files changed, 4 deletions(-) diff --git a/src/pages/content/style.css b/src/pages/content/style.css index ccae644bd..e69de29bb 100644 --- a/src/pages/content/style.css +++ b/src/pages/content/style.css @@ -1,3 +0,0 @@ -p { - margin: inherit; -} \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 0045f55ca..421053aaf 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -27,7 +27,6 @@ export default defineConfig({ devtools: resolve(pagesDir, "devtools", "index.html"), panel: resolve(pagesDir, "panel", "index.html"), content: resolve(pagesDir, "content", "index.ts"), - contentStyle: resolve(pagesDir, "content", "style.css"), background: resolve(pagesDir, "background", "index.ts"), popup: resolve(pagesDir, "popup", "index.html"), newtab: resolve(pagesDir, "newtab", "index.html"),