Giter Site home page Giter Site logo

chipimo / enhanced-erb-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adamuhh/enhanced-erb-template

0.0 0.0 0.0 17.07 MB

An enhanced Electron-React-Boilerplate template equipped with working (client-side) shortcuts/macros, and autoupdates

License: MIT License

JavaScript 8.06% TypeScript 89.52% CSS 2.20% EJS 0.22%

enhanced-erb-template's Introduction

Enhanced ERB Template

This template was created to make it easier and faster to create applications with essential features like an automatic app updater or shortcuts that can actually be used by the application, for both user macros and menubar shortcuts (I'm looking at you, accelerator -.-).

It also follows an app architecture that allows for multiple apps within one Electron application, though it may take some time to get used to.

The Template

The Template

Install

Clone the repo and install dependencies:

git clone https://github.com/AdamUhh/enhanced-erb-template.git your-project-name
cd your-project-name
npm install

Starting Development

Start the app in the dev environment:

npm start

Packaging

There are two package.json files due to the two package.json structure by electron-builder

This structure is beneficial for many reasons, such as smaller builds, performance, etc.

Ensure that these package.json files are updated appropriately with own details, specifically:

./package.json :

  • author
  • description
  • homepage
  • repository.url
  • bugs.url
  • build.productName (Name of app that will appear on windows)
  • build.appId (ex: name.NameOfApp)
  • build.publish.owner (githubname)
  • build.publish.repo (github-repo-name)
  • build.publish.releaseType (draft/prerelease/release)

./release/app/package.json:

This package.json is in charge of your setup.exe

  • name (name-of-app)
  • author (same as other package.json)
  • description (same as other package.json)
  • version (Very important for github release versioning)

Packaging for Production

To package apps for the local platform:

npm run package

Packaging for Production (Github Releases)

To package apps for your local platform & release it to github:

  1. Go to github and create a new release/a new tag (ex: 0.0.10)

  2. Go to ./release/app/package.json and match the version number (to ex: 0.0.10)

  3. Push your files to github

  4. Type the below into your terminal

GH_TOKEN=YOUR-GITHUB-TOKEN-HERE npm run package-publish

You can also (try to) publish packaged apps for different platforms, using the below:

  npm run package-publish:mac <- only supported on macOS
  npm run package-publish:win
  npm run package-publish:linux
  npm run package-publish:all <- won't work if not on macOS

References

Notes

  • Webpack plugins, such as monaco-editor-webpack-plugin must be in devDependencies, or else you will not be able to package the app

Contributions

Inspired by:

enhanced-erb-template's People

Contributors

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