forked from guocaoyi/create-chrome-ext
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(temp):add inferno framework, update docs
- Loading branch information
Showing
68 changed files
with
794 additions
and
40 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
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
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
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,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/icons/logo.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Chrome Extensioin + Inferno + JS + Vite App - Options</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/options/index.jsx"></script> | ||
</body> | ||
</html> |
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,33 @@ | ||
{ | ||
"name": "chrome-extension-inferno-js", | ||
"version": "0.0.0", | ||
"author": "", | ||
"description": "", | ||
"type": "module", | ||
"license": "MIT", | ||
"keywords": [ | ||
"chrome-extension", | ||
"inferno", | ||
"infernojs", | ||
"vite", | ||
"create-chrome-ext" | ||
], | ||
"engines": { | ||
"node": ">=14.18.0" | ||
}, | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"inferno": "^8.0.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.x", | ||
"@babel/parser": "7.x", | ||
"@crxjs/vite-plugin": "^1.0.12", | ||
"vite-plugin-inferno": "0.0.0", | ||
"vite": "^2.9.13" | ||
} | ||
} |
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,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/icon/logo.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Chrome Extensioin + Inferno + JS + Vite App - Popup</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/popup/index.jsx"></script> | ||
</body> | ||
</html> |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,3 @@ | ||
console.info('chrome-ext template-inferno-js background script') | ||
|
||
export {} |
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,3 @@ | ||
console.info('chrome-ext template-inferno-js content script') | ||
|
||
export {} |
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,36 @@ | ||
import { defineManifest } from '@crxjs/vite-plugin' | ||
|
||
export default defineManifest({ | ||
name: 'create-chrome-ext', | ||
description: '', | ||
version: '0.0.0', | ||
manifest_version: 3, | ||
icons: { | ||
16: 'img/logo-16.png', | ||
32: 'img/logo-34.png', | ||
48: 'img/logo-48.png', | ||
128: 'img/logo-128.png', | ||
}, | ||
action: { | ||
default_popup: 'popup.html', | ||
default_icon: 'img/logo-48.png', | ||
}, | ||
options_page: 'options.html', | ||
background: { | ||
service_worker: 'src/background/index.js', | ||
type: 'module', | ||
}, | ||
content_scripts: [ | ||
{ | ||
matches: ['http://*/*', 'https://*/*'], | ||
js: ['src/content/index.js'], | ||
}, | ||
], | ||
web_accessible_resources: [ | ||
{ | ||
resources: ['img/logo-16.png', 'img/logo-34.png', 'img/logo-48.png', 'img/logo-128.png'], | ||
matches: [], | ||
}, | ||
], | ||
permissions: [], | ||
}) |
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,38 @@ | ||
:root { | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, | ||
'Open Sans', 'Helvetica Neue', sans-serif; | ||
} | ||
|
||
main { | ||
text-align: center; | ||
padding: 1em; | ||
margin: 0 auto; | ||
} | ||
|
||
h3 { | ||
color: #d81e06; | ||
text-transform: uppercase; | ||
font-size: 1.5rem; | ||
font-weight: 200; | ||
line-height: 1.2rem; | ||
margin: 2rem auto; | ||
} | ||
|
||
h6 { | ||
font-size: 0.5rem; | ||
color: #333333; | ||
margin: 0.5rem; | ||
} | ||
|
||
a { | ||
font-size: 0.5rem; | ||
margin: 0.5rem; | ||
color: #cccccc; | ||
text-decoration: none; | ||
} | ||
|
||
@media (min-width: 480px) { | ||
h3 { | ||
max-width: none; | ||
} | ||
} |
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,22 @@ | ||
import { Component } from 'inferno' | ||
import './Options.css' | ||
|
||
export class Options extends Component { | ||
render() { | ||
const crx = 'create-chrome-ext' | ||
|
||
return ( | ||
<main> | ||
<h3>Options Page!</h3> | ||
|
||
<h6>v 0.0.0</h6> | ||
|
||
<a href="https://www.npmjs.com/package/create-chrome-ext" target="_blank"> | ||
Power by {crx} | ||
</a> | ||
</main> | ||
) | ||
} | ||
} | ||
|
||
export default Options |
Oops, something went wrong.