From 737ce3e3bff66819ea00403c625e0fe1ed7314b3 Mon Sep 17 00:00:00 2001 From: andrewinci Date: Sat, 18 Mar 2023 18:47:18 +0000 Subject: [PATCH 1/5] build: move release step to local --- .github/workflows/ci.yml | 10 +++++----- package.json | 2 +- readme.md | 10 ++++++++++ src/components/create-edit-bar.tsx | 10 +++++----- src/main.tsx | 6 +++--- 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6510eba..17f4d5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,8 +31,8 @@ jobs: - name: Lint run: yarn lint - - name: Semantic release - if: github.ref == 'refs/heads/main' - run: yarn release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - name: Semantic release + # if: github.ref == 'refs/heads/main' + # run: yarn release + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 61e7601..6073348 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "build": "yarn clean && tsc && OUT_NAME=popup vite build && vite build", "preview": "vite preview", "format": "prettier . --write !package.json !public/manifest.json !CHANGELOG.md", - "prettier:check": "yarn prettier --check . !package.json !public/manifest.json !CHANGELOG.md", + "prettier:check": "yarn prettier --check . !package.json !public/manifest.json !CHANGELOG.md !dist", "lint": "yarn prettier:check && tsc --noEmit && eslint --max-warnings=0 src", "bundle": "yarn lint && yarn build && cd dist && bestzip ../excalistore.zip *", "release": "semantic-release --repositoryUrl=\"https://github.com/andrewinci/excalistore.git\"" diff --git a/readme.md b/readme.md index 6e5fc37..ccd21ba 100644 --- a/readme.md +++ b/readme.md @@ -49,9 +49,19 @@ Build the extension locally yarn build ``` +Bundle the extension + +```bash +yarn bundle +``` + To load the extension in Chrome navigate to [chrome://extensions](chrome://extensions/) and use the `Load unpacked` button to point to the `dist` folder. Make sure to re-build after any change to test them in the browser. +### Publish to the Chrome Web store + +Trigger a release with `yarn release` then manually upload the `excalistore.zip` to the Chrome web store. + ## Credits - [Excalidraw](https://excalidraw.com/) diff --git a/src/components/create-edit-bar.tsx b/src/components/create-edit-bar.tsx index a6623b0..cc1f401 100644 --- a/src/components/create-edit-bar.tsx +++ b/src/components/create-edit-bar.tsx @@ -6,12 +6,12 @@ type CreateEditBarProps = { mode: "Create" | "Edit"; onSave?: (drawingName: string) => void; onUpdate?: () => void; - onClear?: () => void; + onClean?: () => void; onSaveAs?: () => void; }; export const CreateEditBar = (props: CreateEditBarProps) => { - const { activeDrawingName, mode, onSave, onClear, onSaveAs, onUpdate } = + const { activeDrawingName, mode, onSave, onClean, onSaveAs, onUpdate } = props; const [drawingName, setDrawingName] = useState(""); useEffect(() => { @@ -31,8 +31,8 @@ export const CreateEditBar = (props: CreateEditBarProps) => { - @@ -44,7 +44,7 @@ export const CreateEditBar = (props: CreateEditBarProps) => { {activeDrawingName} - @@ -139,7 +141,6 @@ const App = () => { } opened={true} icons={"None"} - onSubmit={checkIsAlive} /> ); } diff --git a/src/script.ts b/src/script.ts index b792d5a..1a74ba1 100644 --- a/src/script.ts +++ b/src/script.ts @@ -46,5 +46,5 @@ onMessageReceived((request, sendResponse) => { break; } }); - +console.log("Loaded"); export {}; diff --git a/src/style/index.ts b/src/style/index.ts index 6630a80..37618ad 100644 --- a/src/style/index.ts +++ b/src/style/index.ts @@ -3,7 +3,7 @@ import { css } from "@emotion/react"; import virgil from "./Virgil.woff2"; export const POP_UP_WIDTH = 500; -export const POP_UP_HEIGHT = 450; +export const POP_UP_HEIGHT = 460; export const GlobalStyles = css` @font-face { @@ -14,9 +14,11 @@ export const GlobalStyles = css` font-family: "virgil"; } html { + width: ${POP_UP_WIDTH}px; min-width: ${POP_UP_WIDTH}px; max-width: ${POP_UP_WIDTH}px; + height: ${POP_UP_HEIGHT}px; min-height: ${POP_UP_HEIGHT}px; max-height: ${POP_UP_HEIGHT}px; From 727de94dcdf1b685b718aabaa2045d364cf32506 Mon Sep 17 00:00:00 2001 From: andrewinci Date: Sun, 19 Mar 2023 07:12:55 +0000 Subject: [PATCH 4/5] build: release from local --- package.json | 2 +- public/manifest.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 6073348..98a4d4b 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "prettier:check": "yarn prettier --check . !package.json !public/manifest.json !CHANGELOG.md !dist", "lint": "yarn prettier:check && tsc --noEmit && eslint --max-warnings=0 src", "bundle": "yarn lint && yarn build && cd dist && bestzip ../excalistore.zip *", - "release": "semantic-release --repositoryUrl=\"https://github.com/andrewinci/excalistore.git\"" + "release": "semantic-release --repositoryUrl=\"https://github.com/andrewinci/excalistore.git\" --ci false" }, "dependencies": { "@emotion/react": "^11.10.6", diff --git a/public/manifest.json b/public/manifest.json index 7610979..8b12e3a 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -3,6 +3,11 @@ "name": "Excalistore", "description": "Store multiple excalidraw diagrams in the browser cache.", "version": "1.0.0", + "browser_specific_settings": { + "gecko": { + "id": "{43af7405-9dc5-422d-b499-8582857d2742}" + } + }, "icons": { "16": "images/icon16.png", "32": "images/icon32.png", From fe27efa6a9b08cc5c9647632278ee3de4470e4ca Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sun, 19 Mar 2023 07:22:04 +0000 Subject: [PATCH 5/5] chore(release): 1.1.0 # [1.1.0](https://github.com/andrewinci/excalistore/compare/v1.0.0...v1.1.0) (2023-03-19) ### Features * support firefox ([d22ad7c](https://github.com/andrewinci/excalistore/commit/d22ad7cddbe2b1ece3e551f990ebc06b36276309)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- public/manifest.json | 17 ++++++++++++----- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e04c448..42deb02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.1.0](https://github.com/andrewinci/excalistore/compare/v1.0.0...v1.1.0) (2023-03-19) + + +### Features + +* support firefox ([d22ad7c](https://github.com/andrewinci/excalistore/commit/d22ad7cddbe2b1ece3e551f990ebc06b36276309)) + # 1.0.0 (2023-03-18) diff --git a/package.json b/package.json index 98a4d4b..b0e06c0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "excalistore", "private": true, - "version": "1.0.0", + "version": "1.1.0", "type": "module", "scripts": { "dev": "vite", diff --git a/public/manifest.json b/public/manifest.json index 8b12e3a..5785c9c 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "Excalistore", "description": "Store multiple excalidraw diagrams in the browser cache.", - "version": "1.0.0", + "version": "1.1.0", "browser_specific_settings": { "gecko": { "id": "{43af7405-9dc5-422d-b499-8582857d2742}" @@ -17,12 +17,19 @@ "content_scripts": [ { "run_at": "document_start", - "js": ["assets/script.js"], - "matches": ["https://excalidraw.com/*"] + "js": [ + "assets/script.js" + ], + "matches": [ + "https://excalidraw.com/*" + ] } ], "action": { "default_popup": "index.html" }, - "permissions": ["storage", "unlimitedStorage"] -} + "permissions": [ + "storage", + "unlimitedStorage" + ] +} \ No newline at end of file