Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate from create-react-app to vite #5

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
globals: {
nw: true
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
}
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "."
schedule:
interval: "weekly"
day: "saturday"
versioning-strategy: increase
groups:
npm:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: ".github/workflows"
schedule:
interval: "weekly"
day: "saturday"
groups:
gha:
patterns:
- "*"
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: test

on:
push:
branches: ["*"]
pull_request:
branches:
- main

concurrency:
group: ${{ github.ref }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/build
/dist
/cache
/out
nwbuild.log

# misc
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nwjs_build_type=sdk
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Build A Desktop Application Using NW.js and React
# NW.js React Example

![A Screenshot of the default app running on Linux](screenshot.png)

## Summary
This is a basic guide for building a desktop application using <a href="https://nwjs.io/">NW.js</a> and <a href="https://reactjs.org/">React</a>.
Expand Down
2 changes: 1 addition & 1 deletion dist.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const defaultBuildCfg = {
'windows',
'linux',
],
nwVersion: '0.70.1',
nwVersion: '0.84.0',
};

// Copy main.js to dist/app/ directory for packaging
Expand Down
17 changes: 17 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!doctype html>
<html lang="en">

<head>
<script src="http://localhost:8097"></script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>NW.js React Example</title>
</head>

<body>
<div id="root"></div>
<script type="module" src="./src/main.jsx"></script>
<link rel="stylesheet" href="./src/index.css" />
</body>

</html>
12 changes: 0 additions & 12 deletions main.js

This file was deleted.

Loading
Loading