freecodecamp.com Gwen Faraday: Live Coding Project: Create an Hour Tracking App using Vue.js
Go to file
The Jared Wilcurt 0c4f455122 Testing
2019-09-16 00:49:40 -04:00
public Mostly set up 2019-07-08 09:32:03 -04:00
src Testing 2019-09-16 00:49:40 -04:00
tests Testing 2019-09-16 00:49:40 -04:00
.browserslistrc Optimize builds 2019-07-09 09:35:38 -04:00
.editorconfig Mostly set up 2019-07-08 09:32:03 -04:00
.eslintrc.js Readme 2019-07-10 09:23:48 -04:00
.gitignore Testing 2019-09-16 00:49:40 -04:00
babel.config.js Mostly set up 2019-07-08 09:32:03 -04:00
jest.config.js Testing 2019-09-16 00:49:40 -04:00
LICENSE Initial commit 2019-07-07 16:05:28 -04:00
nightwatch.conf.js Mostly set up 2019-07-08 09:32:03 -04:00
nightwatch.json Mostly set up 2019-07-08 09:32:03 -04:00
package-lock.json Testing 2019-09-16 00:49:40 -04:00
package.json Testing 2019-09-16 00:49:40 -04:00
postcss.config.js Mostly set up 2019-07-08 09:32:03 -04:00
README.md Update README.md 2019-08-26 11:10:12 -04:00
screenshot.png Mostly set up 2019-07-08 09:32:03 -04:00
server.js Mostly set up 2019-07-08 09:32:03 -04:00
vue.config.js Mostly set up 2019-07-08 09:32:03 -04:00

nw-vue-cli-example

NW.js + Vue-CLI 3 example

A screenshot of the default app running on Windows

  • NW.js
  • Vue-CLI 3
  • Vue 2
  • Vue-DevTools
  • Babel
  • ESLint
  • Jest

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