• Stars
    star
    545
  • Rank 81,313 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Build Electron apps using Next.js

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

More Repositories

1

args

Toolkit for building command line interfaces
JavaScript
457
star
2

electron-next-skeleton

An example Electron app built with Next.js
JavaScript
177
star
3

hyper-native

Make Hyper adapt to the macOS UI
CSS
86
star
4

cory

Tiny generator for static sites
JavaScript
60
star
5

muffin-server

Muffin's site generator and data endpoint
JavaScript
48
star
6

muffin-cli

The command line utility for building sites using muffin
JavaScript
33
star
7

material-ui

A modern UI for Atom
CSS
30
star
8

muffin-client

The Ember app that powers muffin's frontend
JavaScript
15
star
9

hub

A native iOS client for GitHub
Swift
12
star
10

neutron

The easiest (yet most scalable) way to build Electron apps
JavaScript
9
star
11

mailbox

Contact forms re-imagined
JavaScript
8
star
12

names

API client for retrieving random names
JavaScript
8
star
13

symlink

Tiny automator-workflow which creates an symlink on use.
6
star
14

tailwindcss-custom-groups

Generate custom `group-` utilities for TailwindCSS
TypeScript
6
star
15

ask

Receive user input via the command line
JavaScript
6
star
16

muffin.github.io

The place where our documentation lives
CSS
5
star
17

react-refs

Easily set references to React elements
JavaScript
5
star
18

balloon

Build menubar apps for macOS
JavaScript
4
star
19

module-paths

Load the paths of your dependencies
JavaScript
4
star
20

tailwindcss-constants

Apply TailwindCSS utilities only if they match a constant
TypeScript
4
star
21

smoky

A new, modern lightbox written in ES2015
JavaScript
4
star
22

phoenix

This tiny Safari Extension (OS X) removes unnecessary clutter from Twitter.
CSS
2
star
23

ideas

Stuff I was thinking of
HTML
2
star
24

editor

WYSIWYG using the latest web technologies
HTML
2
star
25

neat

Lightweight alternative for jQuery UI
JavaScript
2
star
26

grid

Create elegant, column-based web-layouts
CSS
2
star
27

skeleton

A boilerplate for WordPress themes.
PHP
1
star
28

uptime

The code of an uptime monitor I've written with friends a long while ago
PHP
1
star
29

angefeuert

Where you buy a fireplace for your home
SCSS
1
star
30

curtain

Hide your website behind something fluffy.
PHP
1
star
31

my-trackr

A bugtracker I've started with a friend a while ago
CSS
1
star
32

popout

Allows you to open YT videos in popups.
JavaScript
1
star
33

fired-up-old

The old version of my "fired-up" repo
PHP
1
star
34

github-releases

A microservice that caches and compresses our GitHub Releases
JavaScript
1
star
35

steward

Manage all your WordPress sites in one place
PHP
1
star
36

tucano

A simple blogging theme for wordpress.
PHP
1
star
37

menu

Beautiful menu I've wrote for my oldest personal site
CSS
1
star
38

fuse

WordPress plugin for automatic backups
PHP
1
star
39

cutting-egg

The initial version of Cutting Egg
JavaScript
1
star
40

fired-up

A never published website I've written
JavaScript
1
star
41

menu-second

Another beautiful menu that has never been used
CSS
1
star