generated from chibat/chrome-extension-typescript-starter
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7776e0f
commit edff550
Showing
18 changed files
with
833 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v14.17.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
{ | ||
"typescript.tsdk": "./node_modules/typescript/lib", | ||
"files.eol": "\n", | ||
"json.schemas": [ | ||
{ | ||
"fileMatch": [ | ||
"/manifest.json" | ||
], | ||
"url": "http://json.schemastore.org/chrome-manifest" | ||
} | ||
] | ||
} | ||
"typescript.tsdk": "./node_modules/typescript/lib", | ||
"files.eol": "\n", | ||
"json.schemas": [ | ||
{ | ||
"fileMatch": ["/manifest.json"], | ||
"url": "http://json.schemastore.org/chrome-manifest" | ||
} | ||
], | ||
"editor.formatOnSave": true, | ||
"html.autoClosingTags": false, | ||
"typescript.autoClosingTags": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,17 @@ | ||
# Chrome Extension TypeScript Starter | ||
# Obsidian Web: Connect your browser with your Obsidian notes | ||
|
||
 | ||
|
||
Chrome Extension, TypeScript and Visual Studio Code | ||
*Note: This is a work-in-progress!* This does currently work, but it's not polished enough for me to release to the Chrome Extension Store yet. See "Development" below for how you might use this extension before release. | ||
|
||
## Prerequisites | ||
|
||
* [node + npm](https://nodejs.org/) (Current Version) | ||
|
||
## Option | ||
|
||
* [Visual Studio Code](https://code.visualstudio.com/) | ||
|
||
## Includes the following | ||
|
||
* TypeScript | ||
* Webpack | ||
* React | ||
* Jest | ||
* Example Code | ||
* Chrome Storage | ||
* Options Version 2 | ||
* content script | ||
* count up badge number | ||
* background | ||
|
||
## Project Structure | ||
* [Obsidian Local REST API](https://github.com/coddingtonbear/obsidian-local-rest-api) | ||
* Note: Supports use only with the default port (27124). | ||
|
||
* src/typescript: TypeScript source files | ||
* src/assets: static files | ||
* dist: Chrome Extension directory | ||
* dist/js: Generated JavaScript files | ||
## Development | ||
|
||
## Setup | ||
|
||
``` | ||
npm install | ||
``` | ||
|
||
## Import as Visual Studio Code project | ||
|
||
... | ||
|
||
## Build | ||
|
||
npm i | ||
npm run dev | ||
``` | ||
npm run build | ||
``` | ||
|
||
## Build in watch mode | ||
|
||
### terminal | ||
|
||
``` | ||
npm run watch | ||
``` | ||
|
||
### Visual Studio Code | ||
|
||
Run watch mode. | ||
|
||
type `Ctrl + Shift + B` | ||
|
||
## Load extension to chrome | ||
|
||
Load `dist` directory | ||
|
||
## Test | ||
`npx jest` or `npm run test` | ||
Then: load your "unpacked extension" from [Chrome Extensions](chrome://extensions/) by pointing Chrome at the `dist` folder. |
Oops, something went wrong.