Skip to content

Commit c55b1f0

Browse files
committed
Extension Started with Tailwind and separate folder for separate components
0 parents  commit c55b1f0

24 files changed

+5550
-0
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: build
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [18.x, 20.x]
20+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v1
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
- run: npm ci
29+
- run: npm run build --if-present
30+
- run: npm test

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
npm-debug.log
2+
node_modules/
3+
dist/
4+
tmp/

.vscode/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"typescript.tsdk": "./node_modules/typescript/lib",
3+
"files.eol": "\n",
4+
"json.schemas": [
5+
{
6+
"fileMatch": [
7+
"/manifest.json"
8+
],
9+
"url": "http://json.schemastore.org/chrome-manifest"
10+
}
11+
]
12+
}

.vscode/tasks.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"command": "npm",
6+
"tasks": [
7+
{
8+
"label": "install",
9+
"type": "shell",
10+
"command": "npm",
11+
"args": ["install"]
12+
},
13+
{
14+
"label": "update",
15+
"type": "shell",
16+
"command": "npm",
17+
"args": ["update"]
18+
},
19+
{
20+
"label": "test",
21+
"type": "shell",
22+
"command": "npm",
23+
"args": ["run", "test"]
24+
},
25+
{
26+
"label": "build",
27+
"type": "shell",
28+
"group": "build",
29+
"command": "npm",
30+
"args": ["run", "watch"]
31+
}
32+
]
33+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Tomofumi Chiba
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Chrome Extension TypeScript Starter
2+
3+
![build](https://github.com/chibat/chrome-extension-typescript-starter/workflows/build/badge.svg)
4+
5+
Chrome Extension, TypeScript and Visual Studio Code
6+
7+
## Prerequisites
8+
9+
* [node + npm](https://nodejs.org/) (Current Version)
10+
11+
## Option
12+
13+
* [Visual Studio Code](https://code.visualstudio.com/)
14+
15+
## Includes the following
16+
17+
* TypeScript
18+
* Webpack
19+
* React
20+
* Jest
21+
* Example Code
22+
* Chrome Storage
23+
* Options Version 2
24+
* content script
25+
* count up badge number
26+
* background
27+
28+
## Project Structure
29+
30+
* src/typescript: TypeScript source files
31+
* src/assets: static files
32+
* dist: Chrome Extension directory
33+
* dist/js: Generated JavaScript files
34+
35+
## Setup
36+
37+
```
38+
npm install
39+
```
40+
41+
## Import as Visual Studio Code project
42+
43+
...
44+
45+
## Build
46+
47+
```
48+
npm run build
49+
```
50+
51+
## Build in watch mode
52+
53+
### terminal
54+
55+
```
56+
npm run watch
57+
```
58+
59+
### Visual Studio Code
60+
61+
Run watch mode.
62+
63+
type `Ctrl + Shift + B`
64+
65+
## Load extension to chrome
66+
67+
Load `dist` directory
68+
69+
## Test
70+
`npx jest` or `npm run test`

jest.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
"roots": [
3+
"src"
4+
],
5+
"transform": {
6+
"^.+\\.ts$": ["ts-jest", { tsconfig: "tsconfig.test.json" }]
7+
},
8+
};

0 commit comments

Comments
 (0)