-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update example
- Loading branch information
Showing
16 changed files
with
420 additions
and
1,242 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
.DS_Store | ||
dist | ||
dist-ssr | ||
*.local |
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,24 @@ | ||
{ | ||
"name": "react-screen-wake-lock_example", | ||
"license": "MIT", | ||
"version": "0.0.0", | ||
"scripts": { | ||
"start": "wmr", | ||
"build": "wmr build", | ||
"serve": "wmr serve" | ||
}, | ||
"eslintConfig": { | ||
"root": true, | ||
"extends": "preact" | ||
}, | ||
"alias": { | ||
"react": "preact/compat", | ||
"react-dom": "preact/compat" | ||
"dev": "vite", | ||
"build": "tsc && vite build", | ||
"serve": "vite preview" | ||
}, | ||
"dependencies": { | ||
"preact-iso": "^0.2.0", | ||
"react-screen-wake-lock": "^1.1.5" | ||
"react-screen-wake-lock": "1.1.5" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^7.15.0", | ||
"eslint-config-preact": "^1.1.3", | ||
"wmr": "^1.0.0" | ||
"@types/react": "^17.0.0", | ||
"@types/react-dom": "^17.0.0", | ||
"@vitejs/plugin-react-refresh": "^1.3.1", | ||
"typescript": "^4.1.2", | ||
"vite": "^2.1.3" | ||
}, | ||
"alias": { | ||
"react": "../node_modules/react", | ||
"react-dom": "../node_modules/react-dom/profiling" | ||
} | ||
} |
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
2 changes: 2 additions & 0 deletions
2
example/public/components/NotSupported.tsx → example/src/components/NotSupported.tsx
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,3 +1,5 @@ | ||
import React from 'react'; | ||
|
||
const NotSupported = () => ( | ||
<span className="support"> | ||
<svg | ||
|
2 changes: 2 additions & 0 deletions
2
example/public/components/Supported.tsx → example/src/components/Supported.tsx
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,3 +1,5 @@ | ||
import React from 'react'; | ||
|
||
const Supported = () => ( | ||
<span className="support"> | ||
<svg | ||
|
2 changes: 2 additions & 0 deletions
2
example/public/components/Switch.tsx → example/src/components/Switch.tsx
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,3 +1,5 @@ | ||
import React from 'react'; | ||
|
||
interface Props { | ||
disabled?: boolean; | ||
checked?: boolean; | ||
|
File renamed without changes
File renamed without changes
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,12 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import App from './App'; | ||
import './styles/style.css'; | ||
import './styles/switch.css'; | ||
|
||
ReactDOM.render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
document.getElementById('root') | ||
); |
File renamed without changes.
File renamed without changes.
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,19 +1,20 @@ | ||
{ | ||
"compileOnSave": false, | ||
"compilerOptions": { | ||
"jsx": "preserve", | ||
"allowJs": true, | ||
"checkJs": true, | ||
// "strict": true, | ||
"noEmit": true, | ||
"moduleResolution": "node", | ||
"target": "ESNext", | ||
"module": "esnext", | ||
"resolveJsonModule": true, | ||
"allowSyntheticDefaultImports": true, | ||
"downlevelIteration": true | ||
}, | ||
"typeAcquisition": { | ||
"enable": true | ||
} | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"lib": ["DOM", "DOM.Iterable", "ESNext"], | ||
"types": ["vite/client"], | ||
"allowJs": false, | ||
"skipLibCheck": false, | ||
"esModuleInterop": false, | ||
"allowSyntheticDefaultImports": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"module": "ESNext", | ||
"moduleResolution": "Node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
"jsx": "react" | ||
}, | ||
"include": ["./src"] | ||
} |
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 @@ | ||
import { defineConfig } from 'vite'; | ||
import reactRefresh from '@vitejs/plugin-react-refresh'; | ||
import { resolve } from 'path'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [reactRefresh()], | ||
resolve: { | ||
alias: { | ||
'react-screen-wake-lock': resolve(__dirname, '..'), | ||
}, | ||
}, | ||
}); |
Oops, something went wrong.
6467583
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: