Coder Social home page Coder Social logo

electron-ts's Introduction

Electron App Starter

My boilerplate for new Electron based apps.

Components

  • Electron
  • TypeScript
  • Bootstrap 4

Requirements

  • Node >= v8.10.*
  • Windows: GNU Utils. NPM Scripts use commands like rm -rf so to use them on Windows you'll need to have GNU Utils installed or use WSL etc.

Setup

  • Clone the repo git clone [email protected]:hammus/electron-ts
  • Install the npm dependancies npm install
  • Start the application npm start

Source File Overview

File Description
src/lib/App.ts Simple bootstrap script for electron. Imports Electron.Application and calls Main.Init(app)
src/lib/Main.ts Main BrowserWindow manager, creates the main window and sets up basic IPC
src/lib/IndexView.ts View Controller for index.html

npm Script Tasks

We use npm-run-all to manage parallel and sequential task running. The available tasks are:

Task Command Task Description
npm start Runs build and electron tasks sequentially
npm run build Runs clean, build:all and html tasks sequentially
npm run electron Runs shell command: cross-env NODE_ENV=dev electron .. Starts the Electron Application
npm run build:all Runs ts and css tasks in parallel
npm run ts Runs shell command: tsc. Compiles TypeScripts to dist/lib/*
npm run css Creates the dist and dist/css directories and then runs shell command: uglifycss src/css/Index.css > dist/css/Index/css
npm run clean Runs shell command: rm -rf dist/. Deletes all generated/compiled files.
npm run html Runs shell command: cd dist && mkdir views && cd .. && cp src/views/*.html dist/views. Copies HTML files to dist/views

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.