Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
# Conflicts:
#	package-lock.json
#	package.json
  • Loading branch information
ThorstenHans committed Nov 1, 2018
2 parents f4b5274 + 02ac5c5 commit 7785a00
Show file tree
Hide file tree
Showing 25 changed files with 9,273 additions and 4,954 deletions.
18 changes: 0 additions & 18 deletions .npmignore

This file was deleted.

23 changes: 12 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
language: node_js
cache:
directories:
- node_modules
sudo: required
notifications:
email: false
node_js:
- '7'
- '6'
- '4'
- '10'
before_install:
- export CHROME_BIN=chromium-browser
before_script:
- npm prune
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- export CHROME_BIN=chromium-browser
- if [[ `npm -v` != 6* ]]; then npm i -g npm@6; fi
after_success:
- npm run build
- cp .git dist/ngx-electron/ -r
- cp README.md dist/ngx-electron/
- cd dist/ngx-electron/
- npm install
- npm run semantic-release
branches:
except:
- /^v\d+\.\d+\.\d+$/
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
43 changes: 18 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,34 @@
[![Build Status](https://travis-ci.org/ThorstenHans/ngx-electron.svg?branch=master)](https://travis-ci.org/ThorstenHans/ngx-electron)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)

`ngx-electron` provides an angular wrapper for Electron's APIs exposed as part of the renderer process.
`ngx-electron` is a small Module for [Angular](http://angular.io) which makes calling [Electron]() APIs from the [Renderer Process]() easier. By adding it to your Angular projet, you'll get intelli sense and a simple Angular service which acts as facade for Electron API's.

Besides taking away the pain of correctly loading the APIs, it's also providing strongly typed APIs using `@types/electron` as a dependency.
`ngx-electron` is licensed under [MIT](https://opensource.org/licenses/MIT).

Checkout the introduction post on my [blog](https://medium.com/@ThorstenHans/integrating-angular-and-electron-using-ngx-electron-9c36affca25e#.4scol1nli) for more details.

## Breaking changes
## Introduction

With version `1.0.1` static properties like `isElectronApp` and `runningInElectron` have been removed. Use instance property `isElectronApp` instead.
Checkout the introduction post on my [blog](https://medium.com/@ThorstenHans/integrating-angular-and-electron-using-ngx-electron-9c36affca25e#.4scol1nli) for more details.

## Installation

`ngx-electron` can be installed easily using either `yarn` or `npm` commands in the scope of an angular project.

```
$ yarn add ngx-electron --save
```bash
yarn add ngx-electron --save
# or
$ npm install ngx-electron --save
npm install ngx-electron --save
```

`ngx-electron` is exposing a module called `NgxElectronModule` which needs to be imported in your `AppModule`.
The `NgxElectronModule` needs to be import in your `root` Angular module (eg `AppModule`).

``` typescript
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {NgxElectronModule} from 'ngx-electron';
import {AppComponent} from './app.component';

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';

import { NgxElectronModule } from 'ngx-electron';


@NgModule({
declarations: [],
imports: [
Expand All @@ -44,11 +44,11 @@ export class AppModule {
}
```

Once the module has been imported, you can easily use angular DI to ask for `ElectronService`.
Once the module has been imported, you can easily use dependency injection to get an instance of `ElectronService`.

``` typescript
import {Component} from '@angular/core';
import {ElectronService} from 'ngx-electron';
import { Component } from '@angular/core';
import { ElectronService } from 'ngx-electron';

@Component({
selector: 'my-app',
Expand Down Expand Up @@ -84,10 +84,3 @@ The `ElectronService` is exposing all API's accessible from within Electron's re
* `shell: Electron.Shell` - Electron's Shell API
* `nativeImage: Electron.NativeImage` - Electron's NativeImage API
* `isElectronApp: boolean` - Indicates if app is being executed inside of electron or not


### Static Properties

**Have been removed in release** `1.0.1`
* ~~runningInElectron: boolean~~ - **removed** see `isElectronApp` instance property instead
* ~~isElectronApp: boolean~~ - **removed** see `isElectronApp` instance property
43 changes: 43 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ngx-electron": {
"root": "projects/ngx-electron",
"sourceRoot": "projects/ngx-electron/src",
"projectType": "library",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/ngx-electron/tsconfig.lib.json",
"project": "projects/ngx-electron/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/ngx-electron/test.ts",
"tsConfig": "projects/ngx-electron/tsconfig.tests.json",
"karmaConfig": "projects/ngx-electron/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/ngx-electron/tsconfig.lib.json",
"projects/ngx-electron/tsconfig.tests.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "ngx-electron"
}
32 changes: 0 additions & 32 deletions config/helpers.js

This file was deleted.

37 changes: 0 additions & 37 deletions config/karma.js

This file was deleted.

53 changes: 0 additions & 53 deletions config/specBundle.js

This file was deleted.

91 changes: 0 additions & 91 deletions config/webpack.test.js

This file was deleted.

Loading

0 comments on commit 7785a00

Please sign in to comment.