Giter Site home page Giter Site logo

adamuhh / enhanced-erb-template Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 19.94 MB

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

License: MIT License

JavaScript 6.04% TypeScript 91.43% EJS 0.16% CSS 1.64% Shell 0.73%
autoupdater electron electron-app electron-react electron-react-boilerplate electron-react-template electron-react-typescript electron-react-typescript-template react reactjs

enhanced-erb-template's Introduction

Enhanced ERB Template

This template was created to speedup the development of Electron applications with essential features like automatic app updates and useful customizable shortcuts, making it versatile for creating complex applications. It also follows a simplified app architecture that allows for multiple apps within a single Electron application, although this might require some adaptation.

Preview

Buttons Preview Shortcuts Preview Auto Updater Preview

Getting Started

Installation

Clone the repository and install dependencies:

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

Development

Starting the app (development):

npm start

App Configuration

This project follows the two package.json structure recommended by electron-builder. This structure is beneficial for smaller builds, better performance, and more efficient development workflows.

Before packaging your application, ensure that the following files are updated with your specific project details:

Main Package.json (./package.json)

Update the following fields with your own details:

  • author
  • description
  • homepage
  • repository.url
  • bugs.url
  • build.productName (Name of the app that appears on Windows)
  • build.appId (e.g., com.example.app)
  • build.publish.owner (GitHub username)
  • build.publish.repo (GitHub repository name)
  • build.publish.releaseType (draft/prerelease/release)

Release Package.json (./release/app/package.json)

This file is used for the setup executable:

  • name (Name of the app)
  • author (Same as main package.json)
  • description (Same as main package.json)
  • version (Important for GitHub release versioning)

Building for Production

Packaging Locally

To package the application for your local platform:

npm run package

Packaging (Locally) for GitHub Releases

To package the application and create a release on GitHub, follow these steps:

  1. Ensure GitHub Token: Ensure you have a GitHub token named GH_TOKEN saved in your .env file, or manually set it before running the packaging command.

  2. Versioning: Ensure your versioning number follows the Semantic Versioning rules, (e.g. 0.0.10).

Quick and Easy

Windows:

bash publish.sh 0.0.10

Note: Ensure you are in a Bash terminal, and jq is installed via choco install jq.

Linux:

npm run publish-github -- 0.0.10

Manual Steps

  1. Update the version number in ./release/app/package.json. Ensure it is just numbers (e.g. 0.0.10).

  2. Commit the changes:

    git commit -am "v0.0.10"
  3. Tag the commit:

    git tag v0.0.10
  4. Push changes to GitHub:

    git push && git push --tags
  5. Publish the release:

    GH_TOKEN=YOUR_GITHUB_TOKEN_HERE npm run package-publish

Cross-Platform Packaging

Electron-builder recommends using Docker.

Notes

  • Webpack plugins, such as monaco-editor-webpack-plugin, must be listed in devDependencies to avoid packaging issues.

Contributing

Contributions are welcome! Please follow the standard GitHub workflow for submitting pull requests and issues.

Inspiration

License

This project is licensed under the MIT License. See the LICENSE file for details.

enhanced-erb-template's People

Contributors

adamuhh avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

chipimo

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.