Skip to content

NW.js starter template with Typescript, React and NW.ts-Tools. It works with the VSCode debugger out-of-the-box.

License

Notifications You must be signed in to change notification settings

davidmartinez10/nwts-react-starter

Repository files navigation

NW.ts Tools React Starter

A starter template preconfigured to work with HMR and the VSCode debugger out-of-the-box.

Usage

$ npm install

Then, go to the Run & Debug editor tab and press F5 to run the application inside the debugger.

Take a look at the contents of nwts.manifest.ts, from which the NW.js manifest is generated and saved to disk as package.json inside the public directory. You might also want to read nwts.config.mjs, where some environment variables that are important for the build process are defined.

Main Scripts

npm start or npm run dev-hmr

Runs the app in development mode with hot module replacement.

npm run patch-codecs

Optional. It replaces the FFMPEG library that is included with NW.js. Licensing restrictions apply for non-FOSS programs.

npm run clean

Deletes the build and the package directories.

npm run typecheck

Runs the Typescript static analyzer.

npm run build

Builds for production.

npm run compile-to-bin

Takes a production build and runs it through the nwjccompiler that comes with the SDK flavors of NW.js. Useful for code protection.

Sequential build and distribution

$ npm run clean
$ npm run typecheck
$ npm run build
$ npm run compile-to-bin
$ npm run package

Each script depends on the previous.

npm run package

Packages the app for distribution. Visit NW.ts-Tools or take a look at nwts-tools/types/env.d.ts to know how to configure the packager to your needs.

Included

  • NW.js (SDK flavor)
  • NW.ts-Tools
  • React
  • React Devtools
  • Typescript
  • Vite

About

NW.js starter template with Typescript, React and NW.ts-Tools. It works with the VSCode debugger out-of-the-box.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published