build userscript from sources
This commit is contained in:
parent
3c45019850
commit
94b688843c
6 changed files with 24 additions and 355 deletions
|
@ -4,7 +4,7 @@ import globals from "globals";
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
ignores: ["dist"],
|
ignores: ["dist", "userscript"],
|
||||||
},
|
},
|
||||||
eslintPluginPrettierRecommended,
|
eslintPluginPrettierRecommended,
|
||||||
js.configs.recommended,
|
js.configs.recommended,
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { bookPriceFor } from "./bookPriceFor";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
TODO:
|
TODO:
|
||||||
|
- do not run for books you already bought
|
||||||
- more durable source for rates
|
- more durable source for rates
|
||||||
- React for UI
|
- React for UI
|
||||||
- More informative UI, show loading progress
|
- More informative UI, show loading progress
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "Kobo Price",
|
"name": "Kobo Price",
|
||||||
"description": "Find lowest book price on kobo.com",
|
"description": "Find lowest book price on kobo.com",
|
||||||
"version": "1.1.8",
|
"version": "1.1.9",
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
|
|
12
package.json
12
package.json
|
@ -7,11 +7,13 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"lint": "eslint --fix",
|
"lint": "eslint --fix",
|
||||||
"build": "esbuild lib/index.js --bundle --minify --sourcemap --target=chrome58,firefox57,safari11 --outfile=dist/index.js",
|
"bundle": "esbuild lib/index.js --bundle --minify --sourcemap --target=chrome58,firefox57,safari11 --outfile=dist/index.js",
|
||||||
"watch-build": "npm run build -- --watch",
|
"watch-bundle": "npm run bundle -- --watch",
|
||||||
"watch-ext": "web-ext run --start-url kobo.com",
|
"watch-ext": "web-ext run --start-url https://www.kobo.com/ww/en/ebook/foundation-the-foundation-trilogy-book-1-1",
|
||||||
"watch": "concurrently npm:watch-build npm:watch-ext",
|
"watch": "concurrently npm:watch-bundle npm:watch-ext",
|
||||||
"ext-build": "web-ext build"
|
"build-userscript": "cat userscript/koboprice.meta.js dist/index.js > userscript/koboprice.user.js",
|
||||||
|
"ext-build": "web-ext build",
|
||||||
|
"build-all": "npm run bundle && npm run build-userscript && npm run ext-build"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
|
File diff suppressed because one or more lines are too long
13
userscript/koboprice.user.js
Normal file
13
userscript/koboprice.user.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue