Skip to content

Commit

Permalink
Initial working version.
Browse files Browse the repository at this point in the history
  • Loading branch information
coddingtonbear committed Feb 6, 2022
1 parent 7776e0f commit edff550
Show file tree
Hide file tree
Showing 18 changed files with 833 additions and 250 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14.17.5
23 changes: 12 additions & 11 deletions .vscode/settings.json
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
}
69 changes: 8 additions & 61 deletions README.md
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

![build](https://github.com/chibat/chrome-extension-typescript-starter/workflows/build/badge.svg)

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.
Loading

0 comments on commit edff550

Please sign in to comment.