1.5 KiB
1.5 KiB
nw-vue-cli-example
NW.js + Vue-CLI 3 example
- NW.js
- Vue-CLI 3
- Vue 2
- Vue-DevTools
- Babel
- ESLint
- Jest
Running Locally for development
npm installnpm start- An empty window will pop up while Webpack warm ups
- Once Webpack is running, refresh the window and you're golden
Building for distribution
npm run build:cleanwill delete your./distand./dist-vuefoldersnpm run build:vuewill build just your Vue app for distribution (./dist-vue)npm run build:nwwill build just your NW.js app (./dist)npm run buildis 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
- Linting:
npm run lint- Uses rules in./eslint.json - Unit tests:
npm run test:unit- Jest. - 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: