npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

creative-bot-2

v2.0.1

Published

New version of CreativeBot

Downloads

8

Readme

Electron-React-TypeScript-Webpack-Boilerplate

Pre-configured Electron.js + React.js + TypeScript boilerplate with Webpack v4 & linters config predefined.

This boilerplate currently works on macOS and Windows. If something doesn't work, please file and issue.

Getting started

// execute
git clone https://github.com/iamWing/electron-react-typescript-base-proj.git
// edit the following fields in package.json for your own project
{
  "name": your-project-name,
  "version": whatever-you-like,
  "description": your-own-description,
  "build": {
    "appId": your-app-id,
    "productName": your-product-name,
    "buildVersion": whatever-you-like
  },
  "author": who's-the-author?,
  "license": if-you-don't-want-to-use-MIT,
  "repository": type-and-link-of-your-repo,
  "keywords": keywords-of-your-project,
  "bugs": issue-page-of-your-repo,
  "homepage": homepage-of-your-repo
}

Then install all the node_modules needed by executing the following command:

cd folder-containing-the-cloned-boilerplate
npm run install

Finally execute the following command to start Webpack in development mode and watch the changes on source files.

npm run dev

Building the installer for your Electron app

The boilerplate is currently configured to package & build the installer of your app for macOS & Windows using electron-builder.

For macOS, execute:

npm run build:mac

For Windows, execute:

npm run build:win

** asar archiving is disabled by default in Windows build as it can cause errors while running the installed Electron app based on pervious experiences, whereas the macOS build with asar enabled works just fine. You can turn it back on by removing line 23 ("asar": false) in package.json. **

Extra options

The build scripts are pre-configured to build 64 bit installers since 64 bit should be the standard for a modern applications. 32 bit builds are still possible by changing the build scripts in package.json as below:

// from
"scripts": {
    ...
    "build:win": "electron-builder build --win --x64",
    "build:mac": "electron-builder build --mac --x64"
},

// to
"scripts": {
    ...
    "build:win": "electron-builder build --win --ia32",
    "build:mac": "electron-builder build --mac --ia32"
},

Builds for Linux, armv71, and arm64 can also be configured by modifying the build scripts in package.json, but those aren't tested yet. For details, please refer to documents of electron-builder.

Folder structure

electron-react-typescript-base-proj/
| - dist/               //- Generated by Webpack automatically
| - node_modules/
| - out/                //- Generated by build script automatically
| - public/             //- Global static assets
| | - index.html
| | - style.css
| - src/
| | - main/             //- Backend modules for the Electron app
| | | - main.ts         //- Entry point of 'electron-main'
| | - models/
| | - renderer/         //- Frontend React components for the Electron app
| | | - renderer.tsx    //- Entry point of 'electron-renderer'
| | - utils/            //- Common utilities
| - test/               //- Unit tests
| - .eslintrc           //- ESLint config
| - .gitignore
| - package-lock.json
| - package.json
| - tsconfig.json       //- TypeScript config
| - tslint.json         //- TSLint config
| - webpack.config.js   //- Webpack config

Author

Wing Chau @Devtography

License

Electron React TypeScript Webpack Boilerplate is open source software licensed as MIT.