Build Commands

All build commands are executed via NPM Scripts.

npm run dev [-- -t "{target}"]

Starts a Node.js local development server. See API Proxying During Development for more details.

  • Webpack + vue-loader for single file Vue components.
  • State preserving hot-reload
  • State preserving compilation error overlay
  • Lint-on-save with ESLint
  • -t (or --target=) modifier is optionnal and override the default webpack target. This can allow you to develop in a browser with the Electron option enabled, or the opposite.
  • Source maps

npm run electron

Starts Electron and open a window at your local dev server.

  • Adds some developper friendly features when working in a dev environment:
    • Auto opens the devtools.

npm run build [-- -t "{target}"]

Build assets for production. See Configure you build and Electron support for more details.

  • JavaScript minified with UglifyJS.
  • HTML minified with html-minifier.
  • CSS across all components extracted into a single file and minified with cssnano.
  • All static assets compiled with version hashes for efficient long-term caching, and a production index.html is auto-generated with proper URLs to these generated assets.
  • If you pick Electron support, build will be setup to work over file:// and have access to electron built-in modules.
  • -t (or --target=) modifier is optionnal and override the default webpack target
  • Also see deployment notes.

npm run package [-- -p {platform}]

Package your app for distribution with electron-packager.

  • -- -p {platform} flag is optionnal and will determine the destination platform. Default is your current.
    • linux for Linux.
    • darwin for OS X.
    • win for Windows.
    • all for the three.
  • Portable version of your app (NodeJS and WebKit embedded).
  • Package for Windows/OS X/Linux.
  • Remove all devDependencies from the packaged binary, reducing final size a lot.
  • Does not include development-only files and folders, saving even more space and protecting your app sources.
  • See Electron support

results matching ""

    No results matching ""