GitXplorerGitXplorer
l

electron-next

public
546 stars
41 forks
16 issues

Commits

List of commits on branch master.
Unverified
82346f0ea116882ab7dbc440998cd1d021cdc1ee

3.1.5

lleo committed 6 years ago
Unverified
1590a24cb514565ee5d0bbc84a07bcdf1bf23b6e

Fix/next6 (#19)

hhellais committed 6 years ago
Unverified
ff779d8a17b7e7d77c595e8a8faeedf577c6ddba

3.1.4

lleo committed 7 years ago
Unverified
6ccc02b92a9b55788e385a2b46f17183a7322422

Also use Yarn in the readme

lleo committed 7 years ago
Unverified
1775e815ed6b1e57a60aa682652c80ff4705d563

Switched to Yarn and upgraded dependencies

lleo committed 7 years ago
Unverified
58d84a32e6e22c80df9841427db1e08000c72bc8

Stop resolving absolute paths (#13)

aalbinekb committed 7 years ago

README

The README file for this repository.

electron-next

Build Status XO code style

This package lets you use Next.js for building the renderer of your Electron apps!

  • In production, it ensures that the file:// protocol (which Electron uses to load your static assets in the renderer process) works properly with your Next.js bundle (generated by next export)
  • While developing, it takes care of the whole flow required for building the renderer code

Usage

Firstly, install the package using any node package manager:

yarn add electron-next

Then load it:

const prepareRenderer = require('electron-next')

As the final step, call the package:

  • <path>: The path to the directory containing the renderer (relative to the app's root directory). If the paths for development and production aren't the same, this can be an object holding a development and a production key with their respective paths (string|object).
  • <port>: Used for running Next.js in development (number, optional, defaults to 8000).
await prepareRenderer(<path>, <port>)

Caught a Bug?

  1. Fork this repository to your own GitHub account and then clone it to your local device
  2. Link the package to the global package directory: npm link
  3. Within the electron app of your choice, link it to the dependencies: npm link electron-next. Instead of the default one from npm, it will now use your local clone of the package!

Author