Skip to content

soixantecircuits/nd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

❗️DEPRECATED ❗️

USE soixantecircuits electron-vue

❗️DEPRECATED ❗️

Neodymium template

Neodymium (or nd for short) is a project template for an Electron application.

A project generated with nd uses, among other tools, Node.js, Vue.js, Webpack 2, vue-cli and ESLint to create an Electron application.

Nd sets up these tools and takes care of their settings for you so you can start making your app without worrying about the boilerplate.

js-standard-style

forthebadge forthebadge forthebadge forthebadge

Documentation

The main tutorial can be found here.

Common topics are discussed in the documentation. Make sure to read it!

Usage

This is a project template for vue-cli. It is recommended to use npm 3+ for a more efficient dependency tree.

$ npm install -g vue-cli
$ vue init soixantecircuits/nd my-project
$ cd my-project
$ npm install
$ npm run dev

You can define settings variables for your project in several ways like loading them from a file, from the environment or from command line options. nd uses standard-settings. It will try to load settings automatically from the environment, the command line arguments, from the default settings files settings/settings.default.json and settings/settings.json. You can specify a settings variable in any of those methods, and if it contains a path to a json file, settings will also be loaded from that file

$ customVar=42 npm run dev
  or
$ settings="/path/to/custom/settings.json" npm run dev
  or (for electron)
$ npm run build
$ ./releases/test-linux-x64/project -- --settings="/path/to/custom/settings.json"

If your app is set up to use electron, you can get the loaded settings with require('electron').remote.getGlobal('settings'). If your app is not using electron, the loaded settings are stored in the global variable SETTINGS.

If your app is built for electron and you want to use devtools, simply define a variable DEVTOOLS in your settings. It will open it when you launch your app.

What's Included

  • npm start: first-in-class development experience.

    • Webpack + vue-loader for single file Vue components.
    • State preserving hot-reload
    • State preserving compilation error overlay
    • Lint-on-save with ESLint
    • Source maps
    • Autorun npm run electron in Electron enabled apps.
  • npm run build: Production ready build.

    • 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.
  • npm run electron: developpers friendly features when working in a dev environment.

    • Auto opens the devtools.
  • npm run package: Package your app for distribution with electron-packager.

    • 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.

Fork It And Make Your Own

You can fork this repo to create your own boilerplate, and use it with vue-cli:

vue init username/repo my-project

Credits

This is originally a fork of the webpack template. Most credit goes to them! 👏

The neodymium stack was originally designed as a yeoman generator. It is no longer available.

Releases

No releases published

Packages

No packages published

Languages