Skip to content

Commit

Permalink
chore(ng-intercom): release 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wbhob committed Mar 10, 2017
1 parent e3a8904 commit 4d1c022
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 11 deletions.
Empty file added CHANGELOG.md
Empty file.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-intercom",
"version": "0.1.2",
"version": "0.2.0",
"description": "An Intercom wrapper for Angular",
"main": "index",
"repository": {
Expand All @@ -12,7 +12,7 @@
"Angular"
],
"scripts": {
"build": "./node_modules/.bin/ngc"
"build": "./node_modules/.bin/ngc; cp package.json dist/package.json; cp README.md dist/README.md"
},
"author": "scott-wyatt",
"contributors": [
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { Intercom, IntercomModule } from './module';
export { IntercomModule } from './module';
export { Intercom } from './intercom';
12 changes: 6 additions & 6 deletions src/intercom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ export class IntercomEnvironment {
export class Intercom {
constructor(public intercom: IntercomEnvironment) { }

init(data: object) {
public init(data: object) {
return this.intercom.init(data);
}
boot(data: object) {
public boot(data: object) {
return this.intercom.boot(data);
}
update(data: object) {
public update(data: object) {
return this.intercom.update(data);
}
trackEvent(eventName: string, data: any) {
(<any>window).Intercom('trackEvent', eventName, data);
public trackEvent(eventName: string, data: any) {
return this.intercom.trackEvent(eventName, data);
}
shutdown() {
public shutdown() {
return this.intercom.shutdown();
}
}
21 changes: 21 additions & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
import { IntercomBrowser } from './intercom.browser';
import { Intercom, IntercomEnvironment } from './intercom';


@NgModule({
imports: [CommonModule]
})
export class IntercomModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: IntercomModule,
providers: [
IntercomBrowser,
{ provide: IntercomEnvironment, useClass: IntercomBrowser },
Intercom
]
}
}
}
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"compilerOptions": {
"noImplicitAny": true,
"noEmitOnError": true,
"module": "commonjs",
"target": "ES2016",
"target": "ES5",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true,
Expand Down

0 comments on commit 4d1c022

Please sign in to comment.