From 66e1b98393432d4a609c091eeb38e5b000869bca Mon Sep 17 00:00:00 2001 From: Bauke Date: Wed, 10 Jun 2020 14:51:47 +0200 Subject: [PATCH] Make Parcel not output directories with leading underscores. --- package.json | 4 +-- scripts/bump-version.ts | 5 +--- source/{assets => }/manifest.development.json | 0 source/{assets => }/manifest.json | 28 +++++++++---------- 4 files changed, 17 insertions(+), 20 deletions(-) rename source/{assets => }/manifest.development.json (100%) rename source/{assets => }/manifest.json (61%) diff --git a/package.json b/package.json index 970f5ae..b788eef 100644 --- a/package.json +++ b/package.json @@ -9,11 +9,11 @@ ], "private": true, "scripts": { - "watch": "NODE_ENV=development parcel source/assets/manifest.json -d build/ --no-hmr", + "watch": "NODE_ENV=development parcel source/manifest.json -d build/ --no-hmr", "start": "web-ext run --source-dir build/ --bc", "start:chromium": "yarn start --chromium-profile chromium/ --keep-profile-changes --target chromium --start-url \"chrome://extensions\"", "start:firefox": "yarn start --firefox-profile firefox/ --keep-profile-changes --target firefox-desktop --start-url \"about:debugging#/runtime/this-firefox\"", - "build": "yarn clean && parcel build source/assets/manifest.json -d build/ && web-ext build --source-dir build/ && yarn zip-source", + "build": "yarn clean && parcel build source/manifest.json -d build/ && web-ext build --source-dir build/ && yarn zip-source", "zip-source": "zip -r web-ext-artifacts/tildes_reextended-source.zip ReadMe.md yarn.lock tsconfig.json package.json .gitignore License source/ scripts/ .vscode/", "clean": "trash .cache build/ web-ext-artifacts/", "bump": "ts-node scripts/bump-version.ts && yarn build", diff --git a/scripts/bump-version.ts b/scripts/bump-version.ts index 11256c8..5481e34 100644 --- a/scripts/bump-version.ts +++ b/scripts/bump-version.ts @@ -5,10 +5,7 @@ import semver from 'semver'; import git from 'simple-git/promise'; (async (): Promise => { - const manifestJSONPath: string = join( - __dirname, - '../source/assets/manifest.json' - ); + const manifestJSONPath: string = join(__dirname, '../source/manifest.json'); const packageJSONPath: string = join(__dirname, '../package.json'); const manifestJSON: any = JSON.parse( diff --git a/source/assets/manifest.development.json b/source/manifest.development.json similarity index 100% rename from source/assets/manifest.development.json rename to source/manifest.development.json diff --git a/source/assets/manifest.json b/source/manifest.json similarity index 61% rename from source/assets/manifest.json rename to source/manifest.json index 54d8e53..cc87f10 100644 --- a/source/assets/manifest.json +++ b/source/manifest.json @@ -11,23 +11,23 @@ ], "content_security_policy": "script-src 'self'; object-src 'self'; style-src 'unsafe-inline'", "web_accessible_resources": [ - "./**" + "./assets/**" ], "icons": { - "128": "./tildes-reextended-128.png" + "128": "./assets/tildes-reextended-128.png" }, "background": { "scripts": [ - "../ts/background.ts" + "./ts/background.ts" ] }, "browser_action": { "default_icon": { - "128": "./tildes-reextended-128.png" + "128": "./assets/tildes-reextended-128.png" } }, "options_ui": { - "page": "../html/options.html", + "page": "./html/options.html", "open_in_tab": true }, "content_scripts": [ @@ -37,17 +37,17 @@ ], "run_at": "document_end", "css": [ - "../scss/scripts/jump-to-new-comment.scss", - "../scss/scripts/back-to-top.scss", - "../scss/scripts/user-labels.scss", - "../scss/scripts/markdown-toolbar.scss" + "./scss/scripts/jump-to-new-comment.scss", + "./scss/scripts/back-to-top.scss", + "./scss/scripts/user-labels.scss", + "./scss/scripts/markdown-toolbar.scss" ], "js": [ - "../ts/scripts/jump-to-new-comment.ts", - "../ts/scripts/back-to-top.ts", - "../ts/scripts/user-labels.ts", - "../ts/scripts/markdown-toolbar.ts", - "../ts/scripts/hide-votes.ts" + "./ts/scripts/jump-to-new-comment.ts", + "./ts/scripts/back-to-top.ts", + "./ts/scripts/user-labels.ts", + "./ts/scripts/markdown-toolbar.ts", + "./ts/scripts/hide-votes.ts" ] } ],