Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
biplobsd committed Feb 22, 2023
0 parents commit 0caaa0d
Show file tree
Hide file tree
Showing 37 changed files with 4,677 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["svelte.svelte-vscode"]
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"json.schemas": [
{
"fileMatch": ["manifest.json"],
"url": "https://json.schemastore.org/chrome-manifest.json"
}
]
}
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Svelte Typescript Chrome Extension Boilerplate

> Boilerplate for Chrome Extension Svelte Typescript project
## Features

- [Svelte](https://svelte.dev/)
- [TypeScript](https://www.typescriptlang.org/)
- [Vite](https://vitejs.dev/)
- [CRXJS Vite Plugin](https://github.com/crxjs/chrome-extension-tools/blob/main/packages/vite-plugin/README.md)
- [Chrome Extensions Manifest V3](https://developer.chrome.com/docs/extensions/mv3/intro/)

## Development

```bash
# install dependencies
npm i

# build files to `/dist` directory
# HMR for extension pages and content scripts
npm run dev
```

## Build

```bash
# build files to `/dist` directory
$ npm run build
```

## Load unpacked extensions

[Getting Started Tutorial](https://developer.chrome.com/docs/extensions/mv3/getstarted/)

1. Open the Extension Management page by navigating to `chrome://extensions`.
2. Enable Developer Mode by clicking the toggle switch next to `Developer mode`.
3. Click the `LOAD UNPACKED` button and select the `/dist` directory.

![Example](https://wd.imgix.net/image/BhuKGJaIeLNPW9ehns59NfwqKxF2/vOu7iPbaapkALed96rzN.png?auto=format&w=571)
32 changes: 32 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "facebook-stories-auto-react-tool",
"description": "Facebook stories auto react tool",
"version": "1.0",
"manifest_version": 3,
"icons": {
"16": "src/assets/icons/get_started16.png",
"32": "src/assets/icons/get_started32.png",
"48": "src/assets/icons/get_started48.png",
"128": "src/assets/icons/get_started128.png"
},
"content_scripts": [
{
"matches": ["https://www.facebook.com/stories/*"],
"js": ["src/content/index.ts"]
}
],
"options_ui": {
"page": "src/options/options.html",
"open_in_tab": false
},
"action": {
"default_popup": "src/popup/popup.html",
"default_icon": {
"16": "src/assets/icons/get_started16.png",
"32": "src/assets/icons/get_started32.png",
"48": "src/assets/icons/get_started48.png",
"128": "src/assets/icons/get_started128.png"
}
},
"permissions": ["storage", "tabs"]
}
Loading

0 comments on commit 0caaa0d

Please sign in to comment.