Skip to content
This repository has been archived by the owner on Dec 24, 2024. It is now read-only.

Commit

Permalink
improve and add options page
Browse files Browse the repository at this point in the history
  • Loading branch information
harytfw committed Nov 2, 2022
1 parent 7a7ce5c commit a1a4192
Show file tree
Hide file tree
Showing 74 changed files with 6,087 additions and 1,895 deletions.
32 changes: 21 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

SRC = ./src
DIST = ./dist
BROWSER ?= $(shell which firefox-developer-edition)
NODE_MODULES = ./node_modules

export SRC = ./src
export DIST = ./dist
export BROWSER ?= $(shell which firefox-developer-edition)
export NODE_MODULES = ./node_modules
export WEB_EXT_ARTIFACTS = ./web-ext-artifacts
export BUILD_PROFILE ?= debug
export BUILD_COMMIT_ID = $(shell git rev-parse --short HEAD)
export BUILD_DATE = $(shell date --rfc-3339=seconds)
Expand All @@ -16,13 +16,17 @@ $(shell [ ! -d $(DIST) ] && mkdir $(DIST))
entryPoints = background content_scripts options components
assets = ./content_scripts/content_script.css \
./icon/drag.png \
./options/options.html
./options/options.html \
./_locales

.PHONY: extension
extension: extension-firefox extension-chromium

.PHONY: extension-firefox
extension-firefox: manifest-firefox compile lint package
extension-firefox: clean manifest-firefox compile lint package-firefox

.PHONY: extension-chromium
extension-chromium: manifest-chromium compile package
extension-chromium: clean manifest-chromium compile package-chromium

.PHONY: manifest-firefox
manifest-firefox:
Expand All @@ -32,18 +36,24 @@ manifest-firefox:
manifest-chromium:
@cp $(SRC)/manifest_chromium.json $(DIST)/manifest.json

.PHONY: package
package:
@web-ext build -s $(DIST) --overwrite-dest
.PHONY: package-firefox
package-firefox:
@web-ext build -s $(DIST) -a $(WEB_EXT_ARTIFACTS)/firefox --overwrite-dest

.PHONY: packagec-chromium
package-chromium:
@web-ext build -s $(DIST) -a $(WEB_EXT_ARTIFACTS)/chromium --overwrite-dest

.PHONY: clean
clean:
@rm -rf $(DIST)
@mkdir $(DIST)

.PHONY: compile
compile:
@entryPoints="$(entryPoints)" src=$(SRC) dist=$(DIST) npx rollup -c;
@echo $(assets) | tr " " "\n" | rsync --files-from=- -r $(SRC) $(DIST)
@node scripts/copy_simplecss.mjs

.PHONY: lint
lint:
Expand Down
53 changes: 0 additions & 53 deletions README.zh_cn.md

This file was deleted.

33 changes: 18 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,33 @@
"description": "An drag extension for Firefox Browser.",
"type": "module",
"devDependencies": {
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-replace": "^4.0.0",
"@rollup/plugin-typescript": "^8.3.2",
"@rollup/plugin-commonjs": "^23.0.2",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-replace": "^5.0.1",
"@rollup/plugin-typescript": "^9.0.2",
"@tsconfig/svelte": "^3.0.0",
"@types/chai": "^4.3.1",
"@types/chai": "^4.3.3",
"@types/lodash-es": "^4.17.6",
"@types/mocha": "^9.1.1",
"@types/node": "^18.0.0",
"@types/webextension-polyfill": "^0.9.0",
"@types/mocha": "^10.0.0",
"@types/node": "^18.11.9",
"@types/uuid": "^8.3.4",
"@types/webextension-polyfill": "^0.9.1",
"lodash": "^4.17.21",
"lodash-core": "^4.17.19",
"lodash-es": "^4.17.21",
"mocha": "^10.0.0",
"rollup": "^2.75.7",
"mocha": "^10.1.0",
"rollup": "^3.2.5",
"rollup-plugin-svelte": "^7.1.0",
"rollup-plugin-terser": "^7.0.2",
"svelte": "^3.48.0",
"simpledotcss": "^2.1.1",
"svelte": "^3.52.0",
"svelte-preprocess": "^4.10.7",
"tldts": "^5.7.84",
"tldts": "^5.7.97",
"tslib": "*",
"typescript": "^4.7.4",
"web-ext": "7.1.0",
"webextension-polyfill": "^0.9.0"
"typescript": "^4.8.4",
"uuid": "^9.0.0",
"web-ext": "7.3.1",
"webextension-polyfill": "^0.10.0"
},
"license": "MIT"
}
Loading

0 comments on commit a1a4192

Please sign in to comment.