1.3.2 • Published 5 years ago

generator-electron-typescript-react v1.3.2

Weekly downloads
33
License
MIT
Repository
github
Last release
5 years ago

Yo electron-typescript-react

David npm npm NPM

(electron-typescript-react-boilerplate)

Build cross platform desktop apps with electron, typescript, react and much more powerful tools with scalable configurations.

Generator-electron-typescript-react use Create React App (CRA) as basic, built on the top of it.

Install the Generator

npm i -g yo generator-electron-typescript-react

Run

yo electron-typescript-react

Getting Started

After yo electron-typescript-react, you will see:

---------------------------------------------------

     _-----_     ╭──────────────────────────╮
    |       |    │      Welcome to the      │
    |--(o)--|    │ electron-typescript-reac │
   `---------´   │       t generator!       │
    ( _´U`_ )    ╰──────────────────────────╯
    /___A___\   /
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

---------------------------------------------------

? Type your app's name (electron-typescript-react-app)

Set your app's name and type Enter:

---------------------------------------------------

     _-----_     ╭──────────────────────────╮
    |       |    │      Welcome to the      │
    |--(o)--|    │ electron-typescript-reac │
   `---------´   │       t generator!       │
    ( _´U`_ )    ╰──────────────────────────╯
    /___A___\   /
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

---------------------------------------------------

? Type your app's name test
? Select a framework to use or not
❯ basic
  redux
  mobx

Select a framework, in this example, select redux and type Enter:

If select none, the generator won't change the origin files generated by CRA.

---------------------------------------------------

     _-----_     ╭──────────────────────────╮
    |       |    │      Welcome to the      │
    |--(o)--|    │ electron-typescript-reac │
   `---------´   │       t generator!       │
    ( _´U`_ )    ╰──────────────────────────╯
    /___A___\   /
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

---------------------------------------------------

? Type your app's name test
? Select a framework to use or not redux
? Auto install dependencies by generator? (Y/n)

Tell generator whether to install dependencies, if not, you have to run npm i or yarn after generator finished. In this example, type Enter as Yes.

Then you have to apply overwriting by hand after Create React App finished:

Creating a new React app in /Users/g1eny0ung/demo/test.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

...

---------------------------------------------------
🚀 Running generator...
---------------------------------------------------

...

You need to confirm some overwriting.

 conflict test/src/App.tsx
? Overwrite test/src/App.tsx? (ynaxdH)

Type y and Enter, if you don't want to confirm it many times, type a to overwrite all.

Then waiting dependencies installed.

At last, generator will run git commit to apply all changes:

---------------------------------------------------
Running git commit by generator.
---------------------------------------------------

[master ...] First commit by electron-typescript-react generator
...

---------------------------------------------------
All Done. Enjoy coding.~ 🎉🎉
---------------------------------------------------

Use it

If you won't use it with electron, just run:

// npm start
yarn start

All operations are as same as Create React App.

Otherwise, after run yarn start, open a new terminal window, run:

// npm run start:electron
yarn start:electron

Enjoy coding.~ 🎉🎉

How to Release

chmod +x build.sh
./build.sh

Frameworks

Currently, generator-electron-typescript-react has these frameworks:

How to contribute

Pull a request or open an issue to describe your changes or problems

License

MIT © g1eny0ung

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.7

6 years ago

1.2.6

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago