Skip to content

Commit 20bd901

Browse files
author
Vlad Haidei
committed
README.md
1 parent 8cda1a3 commit 20bd901

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

README.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
[![Angular Logo](./src/assets/images/angular.png)](https://angular.io/)
2+
[![TypeORM Logo](./src/assets/images/typeorm.png)](http://typeorm.io/)
3+
[![Electron Logo](./src/assets/images/electron.svg)](https://electron.atom.io/)
4+
5+
[![Build Status](https://travis-ci.org/CubikNeRubik/angular-electron-typeorm-starter.svg?branch=master)](https://travis-ci.org/CubikNeRubik/angular-electron-typeorm-starter)
6+
[![License](http://img.shields.io/badge/Licence-MIT-brightgreen.svg)](LICENSE.md)
7+
8+
[![Watch on GitHub][github-watch-badge]][github-watch]
9+
[![Star on GitHub][github-star-badge]][github-star]
10+
11+
# Quickstart
12+
``` bash
13+
git clone https://github.com/CubikNeRubik/angular-electron-typeorm-starter.git
14+
npm install
15+
npm start
16+
```
17+
18+
# Introduction
19+
20+
This is a start kit for easy launch of Electron, Angular 6 and TypeORM.
21+
22+
Currently runs with:
23+
24+
- Angular v6.1.1
25+
- Electron v2.0.6
26+
- Electron Builder v20.27.0
27+
- TypeORM v0.2.7
28+
- SQLite v4.0.2
29+
30+
With this start kit, you can :
31+
32+
- Run your app in a local development environment with Electron & Hot reload
33+
- Run your app in a production environment
34+
- Package your app into an executable file for Linux, Windows & Mac
35+
36+
## Getting Started
37+
38+
Clone this repository locally :
39+
40+
``` bash
41+
git clone https://github.com/CubikNeRubik/angular-electron-typeorm-starter.git
42+
```
43+
44+
Install dependencies with npm :
45+
46+
``` bash
47+
npm install
48+
```
49+
50+
If you want to generate Angular components with Angular-cli , you **MUST** install `@angular/cli` in npm global context.
51+
Please follow [Angular-cli documentation](https://github.com/angular/angular-cli) if you had installed a previous version of `angular-cli`.
52+
53+
``` bash
54+
npm install -g @angular/cli
55+
```
56+
57+
## To build for development
58+
59+
- **in a terminal window** -> npm start
60+
61+
The application code is managed by `main.ts`. In this sample, the app runs with a simple Angular App (http://localhost:4200) and an Electron window.
62+
The Angular component contains an example of Electron and NodeJS native lib import.
63+
You can desactivate "Developer Tools" by commenting `win.webContents.openDevTools();` in `main.ts`.
64+
65+
## Included Commands
66+
67+
|Command|Description|
68+
|--|--|
69+
|`npm run ng:serve:web`| Execute the app in the browser |
70+
|`npm run build`| Build the app. Your built files are in the /dist folder. |
71+
|`npm run build:prod`| Build the app with Angular aot. Your built files are in the /dist folder. |
72+
|`npm run electron:local`| Builds your application and start electron
73+
|`npm run electron:linux`| Builds your application and creates an app consumable on linux system |
74+
|`npm run electron:windows`| On a Windows OS, builds your application and creates an app consumable in windows 32/64 bit systems |
75+
|`npm run electron:mac`| On a MAC OS, builds your application and generates a `.app` file of your application that can be run on Mac |
76+
77+
**Your application is optimised. Only /dist folder and node dependencies are included in the executable.**
78+
79+
## Browser mode
80+
81+
You can't use TypeORM in browser so it is not possible.
82+
If you need to run app in browser and don't need TypeORM you can use [angular-electron](https://github.com/maximegris/angular-electron) for that
83+
84+
[github-watch-badge]: https://img.shields.io/github/watchers/CubikNeRubik/angular-electron-typeorm-starter.svg?style=social
85+
[github-watch]: https://github.com/CubikNeRubik/angular-electron-typeorm-starter/watchers
86+
[github-star-badge]: https://img.shields.io/github/stars/CubikNeRubik/angular-electron-typeorm-starter.svg?style=social
87+
[github-star]: https://github.com/CubikNeRubik/angular-electron-typeorm-starter/stargazers

0 commit comments

Comments
 (0)