NW-Vue3-Typescript-Pinia is an open-source project based on NW.js, Vue 3, Typescript, and Pinia, designed to help developers quickly build applications on the NW.js platform.
This project is heavily derived from nw-vue3-boilerplate.
- First, make sure you have installed Node.js and npm.
- Clone this repository:
git clone git@github.com:codeh2o/nw-vue3-typescript-pinia.git
- Navigate to the project directory and install the dependencies:
cd nw-vue3-typescript-pinia
npm install
To run the development server for both web and desktop versions concurrently:
npm run dev
This command will start a web server using Vite on port 4175 and launch the desktop version of the app using NW.js after the web server is ready.
To build the app, run:
npm run build
This command will clean the ./dist-vue
and ./dist
directories, build the web version using Vite, and build the desktop versions for Windows, Linux, and macOS using NW.js. The built executables will be located in the ./dist
directory.
npm run dev:web
: Runs the web version in development mode using Vite.npm run dev:desktop
: Runs the desktop version in development mode using NW.js.npm run build:web
: Builds the web version using Vite.npm run build:clean
: Deletes the./dist-vue
and./dist
directories.npm run build:nw
: Builds the desktop versions for Windows, Linux, and macOS using NW.js.npm run build:win
: Builds the Windows desktop version using NW.js.npm run build:lin
: Builds the Linux desktop version using NW.js.npm run run:win
: Runs the built Windows desktop version.npm run run:lin
: Runs the built Linux desktop version.npm run preview:web
: Previews the web version using Vite.npm run update:vue-devtools
: Updates the prebuilt NW.js Vue.js Devtools to the latest version.
This project uses the following technologies:
- NW.js - An open-source framework for building desktop applications with HTML, CSS, and JavaScript.
- Vue 3 - A progressive JavaScript framework for building user interfaces.
- TypeScript - A typed superset of JavaScript that compiles to plain JavaScript.
- Pinia - A state management library for Vue.
- nw-vue3-boilerplate. A fully featured boilerplate, complete with Vite, Vitest, & Pinia integration and automated builds for web and desktop. Comes with Vue DevTools built in.
- nw-vue-cli-example - Uses Vue-CLI, has Vue 2 and Vue 3 branches.
- nwjs-vue - Uses Vue-CLI 2
- vue-desktop-basic - Does not use a build system at all, all
.vue
files run directly in the browser context
We welcome and appreciate your contributions! If you would like to contribute code, please follow these steps:
- Fork this repository to your GitHub account.
- Clone your forked repository to your local machine.
- Make your changes and test them locally.
- Commit your changes.
- Create a pull request and describe the changes and reasons for them.
We will review your pull request and communicate with you promptly.
NW-Vue3-Typescript-Pinia is released under the MIT License. See the License file for details.