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.
debug(qwik):debug for run success, but had not working yet
- Loading branch information
Showing
10 changed files
with
61 additions
and
120 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<!-- THIS FILE IS ONLY USED DURING DEVELOPMENT --> | ||
<!-- THIS FILE WILL NEVER SHOW UP IN PRODUCTION DEPLOYMENT --> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Qwik Client Dev Mode</title> | ||
<meta name="viewport" content="width=device-width" /> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/icons/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Chrome Extensioin + Qwik + TS + Vite App - Options</title> | ||
</head> | ||
<body> | ||
<script type="module"> | ||
// Vite Dev Mode Only | ||
import { render, jsx } from '@builder.io/qwik'; | ||
import { Main } from '/src/main.tsx'; | ||
render(document.body, jsx(Main, {})); | ||
</script> | ||
<div id="app"></div> | ||
<script type="module" src="/src/options/index.tsx"></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
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 |
---|---|---|
@@ -1,18 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<!-- THIS FILE IS ONLY USED DURING DEVELOPMENT --> | ||
<!-- THIS FILE WILL NEVER SHOW UP IN PRODUCTION DEPLOYMENT --> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Qwik Client Dev Mode</title> | ||
<meta name="viewport" content="width=device-width" /> | ||
<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 + Qwik + TS + Vite App - Popup</title> | ||
</head> | ||
<body> | ||
<script type="module"> | ||
// Vite Dev Mode Only | ||
import { render, jsx } from '@builder.io/qwik'; | ||
import { Main } from '/src/main.tsx'; | ||
render(document.body, jsx(Main, {})); | ||
</script> | ||
<div id="app"></div> | ||
<script type="module" src="/src/popup/index.tsx"></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 |
---|---|---|
@@ -1,20 +1,24 @@ | ||
import { useState } from 'preact/hooks' | ||
import { component$, Host } from '@builder.io/qwik' | ||
import './Options.css' | ||
|
||
export const Options = () => { | ||
const [crx, setCrx] = useState('create-chrome-ext') | ||
interface Props {} | ||
|
||
export const Options = component$((props: Props) => { | ||
const crx = 'create-chrome-ext' | ||
|
||
return ( | ||
<main> | ||
<h3>Options Page!</h3> | ||
<Host> | ||
<main> | ||
<h3>Options Page!</h3> | ||
|
||
<h6>v 0.0.0</h6> | ||
<h6>v 0.0.0</h6> | ||
|
||
<a href="https://www.npmjs.com/package/create-chrome-ext" target="_blank"> | ||
Power by {crx} | ||
</a> | ||
</main> | ||
<a href="https://www.npmjs.com/package/create-chrome-ext" target="_blank"> | ||
Power by {crx} | ||
</a> | ||
</main> | ||
</Host> | ||
) | ||
} | ||
}) | ||
|
||
export default Options |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import { render } from 'preact' | ||
import { render, jsx } from '@builder.io/qwik' | ||
|
||
import { Options } from './Options' | ||
import './index.css' | ||
|
||
render(<Options />, document.getElementById('app') as HTMLElement) | ||
render(document.getElementById('app') ?? document.body, jsx(Options, {})) |
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 |
---|---|---|
@@ -1,26 +1,6 @@ | ||
import { component$, useStore } from '@builder.io/qwik' | ||
import { render, jsx } from '@builder.io/qwik' | ||
|
||
import { Popup } from './Popup' | ||
import './index.css' | ||
|
||
/** | ||
* Overall application component. | ||
* | ||
* This component is static (meaning it will never change). Because of this | ||
* Qwik knows that it should never need to be rerendered, and its code will never | ||
* download to the client. | ||
*/ | ||
export const Main = component$(() => { | ||
const todos = useStore({ | ||
filter: 'all', | ||
items: [ | ||
{ completed: false, title: 'Read Qwik dhocs' }, | ||
{ completed: false, title: 'Build HelloWorld' }, | ||
{ completed: false, title: 'Profit' }, | ||
], | ||
}) | ||
return ( | ||
<section class="todoapp"> | ||
<Header todos={todos} /> | ||
</section> | ||
) | ||
}) | ||
render(document.getElementById('app') ?? document.body, jsx(Popup, {})) |
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"composite": true, | ||
"module": "ESNext", | ||
"moduleResolution": "Node" | ||
}, | ||
"include": ["vite.config.ts", "src/**/*.ts"] | ||
} |
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