Initial commit

This commit is contained in:
James Skemp 2023-04-19 01:56:42 +00:00
commit b1e723ad49
9 changed files with 2767 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
node_modules
# Parcel output directory
dist/
.parcel-cache/

3
.parcelrc Normal file
View File

@ -0,0 +1,3 @@
{
"extends": "@parcel/config-webextension"
}

10
README.md Normal file
View File

@ -0,0 +1,10 @@
# Chrome Extension Template with TypeScript and Parcel
1. Add code/make sure all `CHANGE_ME` and `chrome-extension-template` instances are updated.
2. Update package.json:
- name
- version
- description
- repository
- author
- license
3. `npm run build`

9
manifest.json Normal file
View File

@ -0,0 +1,9 @@
{
"manifest_version": 3,
"name": "CHANGE_ME",
"description": "CHANGE_ME",
"version": "1.0",
"action": {
"default_popup": "src/index.html"
}
}

2693
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

23
package.json Normal file
View File

@ -0,0 +1,23 @@
{
"name": "chrome-extension-template",
"version": "1.0.0",
"description": "",
"scripts": {
"build": "parcel build manifest.json",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/JamesSkemp/chrome-extension-template.git"
},
"author": "James Skemp",
"license": "CC0",
"devDependencies": {
"@types/chrome": "^0.0.232",
"parcel": "^2.8.3",
"typescript": "^5.0.4"
},
"dependencies": {
"@parcel/config-webextension": "^2.8.3"
}
}

8
src/index.html Normal file
View File

@ -0,0 +1,8 @@
<html>
<head>
<script src="index.ts"></script>
</head>
<body>
<h1>CHANGE_ME</h1>
</body>
</html>

1
src/index.ts Normal file
View File

@ -0,0 +1 @@
alert('asdf');

15
tsconfig.json Normal file
View File

@ -0,0 +1,15 @@
{
"compilerOptions": {
"strict": true,
"module": "ES2022",
"target": "ES2022",
"esModuleInterop": true,
"sourceMap": true,
"rootDir": "src",
"outDir": "dist/js",
"noEmitOnError": true,
"typeRoots": [
"node_modules/@types"
]
}
}