Nondeterministic Polynomial Munchies
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

nextron

3.3.13 • Public • Published

Build an Electron + Next.js app for speed ⚡

(The screenshot above is a top page of examples/with-typescript-material-ui.)

Support

nextron next
v2.x / v3.x v7.x
v1.x v6.x

My Belief for Nextron

  1. Show a way of developing desktop apps only web knowledge
  2. Easy to use
  3. Be transparent (Open to OSS developers)

Otherwise Specified

Usage

Install

$ npm install --global nextron@latest

Create Application

To create <MY-APP>, just run the command below:

$ nextron init <MY-APP>

Create Application with Template

You can use examples/* apps as a template.

To create the examples/with-typescript-material-ui app, run the command below:

$ nextron init <MY-APP> --template with-typescript-material-ui

Run Electron with Development Mode

Run npm run dev, and nextron automatically launches an electron app.

{
  "scripts": {
    "dev": "node build/nextron.js"
  }
}

Production Build

Run npm run build, and nextron outputs packaged bundles under the dist folder.

{
  "scripts": {
    "build": "node build/nextron.js build"
  }
}

Build Options

To build Windows 32 bit version, run npm run build:win32 like below:

{
  "scripts": {
    "build": "node build/nextron.js build",
    "build:all": "node build/nextron.js build --all",
    "build:win32": "node build/nextron.js build --win --ia32",
    "build:win64": "node build/nextron.js build --win --x64",
    "build:mac": "node build/nextron.js build --mac --x64",
    "build:linux": "node build/nextron.js build --linux"
  }
}

CAUTION: To build macOS binary, your host machine must be macOS!

Build Configuration

Edit package.json#build properties for custom build configuration.

{
  "build": {
    "appId": "com.example.nextron",
    "productName": "My Nextron App",
    "copyright": "Copyright © 2018 Yoshihide Shiono",
    "directories": {
      "output": "dist",
      "buildResources": "resources"
    },
    "publish": null
  }
}

For more information, please check out electron-builder official configuration documents.

Examples

See examples folder for more information.

Or you can start the example app by nextron init <app-name> --template <example-dirname>.

To list all examples, just type the command below:

$ nextron list

examples/custom-build-options

$ nextron init my-app --template custom-build-options

examples/ipc-communication

$ nextron init my-app --template ipc-communication

examples/parameterized-routing

$ nextron init my-app --template parameterized-routing

examples/with-javascript

$ nextron init my-app --template with-javascript

examples/with-javascript-ant-design

$ nextron init my-app --template with-javascript-ant-design

examples/with-javascript-material-ui

$ nextron init my-app --template with-javascript-material-ui

examples/with-typescript

$ nextron init my-app --template with-typescript

examples/with-typescript-less

$ nextron init my-app --template with-typescript-less

examples/with-typescript-material-ui

$ nextron init my-app --template with-typescript-material-ui

Develop

Basic

$ git clone https://github.com/saltyshiomix/nextron
cd nextron
$ yarn
$ yarn dev # default is examples/with-javascript-material-ui 

Developing examples/*

$ yarn dev <EXAMPLE-FOLDER-NAME>

Related

install

npm i nextron

Downloadsweekly downloads

1,773

version

3.3.13

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability