Giter VIP home page Giter VIP logo

cra-lerna-electron's Introduction

cra-lerna-electron

Minimal starter kit: โš›๏ธโ€Šcreate-react-app + ๐Ÿ‰ Lerna + :electron: Electron

Getting Started

# Fetch this repo
git clone https://github.com/amaurymartiny/cra-lerna-electron my-app
cd my-app

# Bootstrap the Lerna project, will install all modules
yarn install

Folder structure

The main idea of this starer kit is to separate the Electron and React parts.

.
โ”œโ”€โ”€ lerna.json                    # Config for Lerna
โ”œโ”€โ”€ package.json                  # Package.json for the whole repo
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ crale-electron/
โ”‚   โ”‚   โ”œโ”€โ”€ electron-builder.json # Config for electron-build
โ”‚   โ”‚   โ”œโ”€โ”€ electron-webpack.json # Config for electron-webpack
โ”‚   โ”‚   โ”œโ”€โ”€ dist/                 # Binaries bundles by electron-builder
โ”‚   โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ main/             # Your electron app goes here
โ”‚   โ”‚   โ”œโ”€โ”€ static/               # Symlinks to ../crale-react/build/ folder
โ”‚   โ”œโ”€โ”€ crale-react
โ”‚   โ”‚   โ”œโ”€โ”€ build/                # The built app generated by CRA
โ”‚   โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ”‚   โ”œโ”€โ”€ src/                  # Your react app goes here

Available Commands

All these commands should be run from the project root.

Command Description
yarn start Run Electron and React in dev mode, with live reload on file changes. Allows fast iterations.
yarn build Build Electron and React.
yarn electron Build Electron and React, and open Electron with these built files.
yarn package Build Electron and React, and generate binaries with these built files.
yarn lint Check for linting issues in the code.
yarn test Run tests.

For the exhaustive list of available commands, check package.json.

Tooling

Tool Description
create-react-app All tooling needed for React apps.
lerna Manage JavaScript projects with multiple packages.
electron-webpack Scripts and configurations to compile Electron applications using webpack.
electron-builder A complete solution to package and build a ready for distribution Electron app.

License

MIT.

cra-lerna-electron's People

Contributors

dependabot-preview[bot] avatar amaury1093 avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.