NWJS_Hour_Tracking/README.md
The Jared Wilcurt 8d5ef466f8 Update README
2019-10-29 13:12:00 -04:00

2.3 KiB

nw-vue-cli-example

Build Status

NW.js + Vue-CLI 4 example

A screenshot of the default app running on Windows

  • NW.js
  • Vue-CLI 4
  • Vue 2
  • Vue-DevTools (latest)
  • Babel
  • ESLint
  • Jest (100% test coverage)

Running Locally for development

  1. npm install
  2. npm start
  3. An empty window will pop up while Webpack warm ups
  4. Once Webpack is running, refresh the window and you're golden

Building for distribution

  1. npm run build:clean will delete your ./dist and ./dist-vue folders
  2. npm run build:vue will build just your Vue app for distribution (./dist-vue)
  3. npm run build:nw will build just your NW.js app (./dist)
  4. npm run build is your all-in-one command. It will clean out the old dist folders and build your Vue and NW.js app

IMPORTANT NOTE ABOUT BUILDS!!!

They take a long time. If you do npm run build expect it to take 10-30 minutes (depending on amount of dependencies in the dist and your CPU/internet). This can be adjusted by changing the build params in the package.json. The more platforms and build types, the longer it takes.

Automated quality enforcment

  1. Linting: npm run lint - Uses rules in ./eslint.json
  2. Unit tests: npm run test:unit - Jest.
  3. End-to-end: npm run test:e2e - Accepting PR to make tests run in NW.js. - Nightwatch.

Customize configuration

Want Vue-Router? Vuex? Use the Vue-CLI to add them:


Alternatives

  • 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

Maintainence of this repo

This is not for those using this repo, but for those maintaining it.

  1. When updating the version of NW.js devDependency, also update these:
  • tests/unit/setup.js
  • tests/unit/components/__snapshots__/HelloWorld.test.js.snap
  • .browserslistrc
  1. Run npm run regression after updating dependencies or other major changes to verify builds still work correctly