Skip to content

Commit

Permalink
feat(API definition): Renamed toast.module to toaster.module
Browse files Browse the repository at this point in the history
toast.module renamed to toaster.module for greater consistency with
other components representing top-level APIs.
A plunker demo has been created and added to the README to begin work on
#46
The previous NPM build 0.3.6-rc.5 was improperly built with
**toast.module** not being included. The module is now renamed and
included appropriately.
  • Loading branch information
Stabzs committed Aug 25, 2016
1 parent 1ea8aa1 commit 95e64c3
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 22 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 0.4.0-rc.5 (2016-08-24)
### Features
* **toast.module:** toast.module renamed to **toaster.module** for greater consistency with other
components representing top-level APIs.
* **demo:** A plunker demo has been created and added to the README to begin work on
[#46](https://github.com/Stabzs/Angular2-Toaster/issues/46).

### Bug Fixes
* **toaster.module:** previous NPM build 0.3.6-rc.5 was improperly built with **toast.module** not
being included. The module is now renamed and included appropriately.


# 0.3.6-rc.5 (2016-08-18)
### Features
* **Angular: RC5:** The library has been updated to Angular RC5.
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ largely based off of [AngularJS-Toaster](https://github.com/jirikavi/AngularJS-T
[![Build Status](https://travis-ci.org/Stabzs/Angular2-Toaster.svg?branch=master)](https://travis-ci.org/Stabzs/Angular2-Toaster)
[![Coverage Status](https://coveralls.io/repos/github/Stabzs/Angular2-Toaster/badge.svg?branch=master&busted=0.3.6-rc.4)](https://coveralls.io/github/Stabzs/Angular2-Toaster?branch=master)

### Current Version 0.3.6-rc.5
### Current Version 0.4.0-rc.5

## Installation:

Expand Down Expand Up @@ -48,14 +48,20 @@ Generate test coverage report:
npm run coverage
```


## Demo
A dynamic Angular2 and Typescript demo can be found at
[this plunker](http://plnkr.co/edit/hkENUhos6q9fhiOHprXO?p=preview).


## Getting Started With Default Configuration - NgModule:
```typescript
import {NgModule} from '@angular/core';
import {ToastModule, ToasterService} from 'angular2-toaster/angular2-toaster';
import {ToasterModule, ToasterService} from 'angular2-toaster/angular2-toaster';
import {Root} from './root.component'

@NgModule({
imports: [ToastModule],
imports: [ToasterModule],
declarations: [Root],
providers: [],
bootstrap: [Root]
Expand Down
2 changes: 1 addition & 1 deletion angular2-toaster.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ export * from './lib/toast.component';
export * from './lib/toaster-config';
export * from './lib/toaster-container.component';
export * from './lib/toaster.service';
export * from './lib/toast.module';
export * from './lib/toaster.module';
2 changes: 1 addition & 1 deletion angular2-toaster.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ exports.ToastComponent = require('./lib/toast.component').ToastComponent;
exports.ToasterConfig = require('./lib/toaster-config').ToasterConfig;
exports.ToasterContainerComponent = require('./lib/toaster-container.component').ToasterContainerComponent;
exports.ToasterService = require('./lib/toaster.service').ToasterService;
exports.ToastModule = require('./lib/toast.module').ToastModule;
exports.ToasterModule = require('./lib/toaster.module').ToasterModule;
4 changes: 2 additions & 2 deletions demo/systemjs-angularquickstart-structure/app/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {NgModule, Component} from '@angular/core';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {BrowserModule} from '@angular/platform-browser';
import {ToastModule, BodyOutputType, Toast, ToasterConfig, ToasterService, ToasterContainerComponent}
import {ToasterModule, BodyOutputType, Toast, ToasterConfig, ToasterService, ToasterContainerComponent}
from 'angular2-toaster/angular2-toaster';


Expand Down Expand Up @@ -75,7 +75,7 @@ export class Root{
@NgModule({
declarations: [TestComponent, Root],
bootstrap: [Root],
imports: [BrowserModule, ToastModule]
imports: [BrowserModule, ToasterModule]
})
export class Module {}

Expand Down
2 changes: 1 addition & 1 deletion demo/systemjs-angularquickstart-structure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"angular2": "^2.0.0-rc.5",
"angular2-toaster": "0.3.6-rc.5",
"angular2-toaster": "0.4.0-rc.5",
"es6-shim": "0.33.3",
"http-server": "^0.8.5",
"reflect-metadata": "0.1.2",
Expand Down
2 changes: 1 addition & 1 deletion demo/systemjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@angular/platform-browser": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
"rxjs": "5.0.0-beta.6",
"angular2-toaster": "0.3.6-rc.5",
"angular2-toaster": "0.4.0-rc.5",
"es6-shim": "0.35.0",
"http-server": "^0.8.5",
"reflect-metadata": "0.1.3",
Expand Down
4 changes: 2 additions & 2 deletions demo/systemjs/src/app.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {NgModule} from '@angular/core';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {BrowserModule} from '@angular/platform-browser';
import {ToastModule} from 'angular2-toaster/lib/toast.module';
import {ToasterModule} from 'angular2-toaster/lib/toaster.module';

import {Root} from './root.component'
import {TestComponent} from './test.component'
Expand All @@ -10,7 +10,7 @@ import {TestComponent3} from './test3.component'
import {TestComponent4} from './test4.component'

@NgModule({
imports: [BrowserModule, ToastModule],
imports: [BrowserModule, ToasterModule],
declarations: [TestComponent, TestComponent2, TestComponent3, TestComponent4, Root],
providers: [],
bootstrap: [Root]
Expand Down
2 changes: 1 addition & 1 deletion demo/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"@angular/common": "2.0.0-rc.5",
"@angular/core": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
"angular2-toaster": "0.3.0-rc.5"
"angular2-toaster": "0.4.0-rc.5"
}
}
4 changes: 2 additions & 2 deletions demo/webpack/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require('zone.js/dist/long-stack-trace-zone');

import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {NgModule, Component} from '@angular/core';
import {ToastModule, ToasterContainerComponent, ToasterService, ToasterConfig} from 'angular2-toaster/angular2-toaster';
import {ToasterModule, ToasterContainerComponent, ToasterService, ToasterConfig} from 'angular2-toaster/angular2-toaster';
import {BrowserModule} from '@angular/platform-browser';
import {FORM_PROVIDERS} from '@angular/common';

Expand Down Expand Up @@ -48,7 +48,7 @@ export class App {
@NgModule({
declarations: [TestComponent, App],
bootstrap: [App],
imports: [BrowserModule, ToastModule]
imports: [BrowserModule, ToasterModule]
})
export class Module {}

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular2-toaster",
"version": "0.3.6-rc.5",
"version": "0.4.0-rc.5",
"description": "An Angular 2 Toaster Notification library based on AngularJS-Toaster",
"main": "angular2-toaster.ts",
"scripts": {
Expand Down Expand Up @@ -58,4 +58,4 @@
"typescript": "1.8.10",
"zone.js": "0.6.12"
}
}
}
8 changes: 4 additions & 4 deletions src/toaster-container.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {ToasterService} from './toaster.service';
import {ToasterContainerComponent} from './toaster-container.component';
import {ToasterConfig} from './toaster-config';
import {BodyOutputType} from './bodyOutputType';
import {ToastModule} from './toast.module';
import {ToasterModule} from './toaster.module';
import {BrowserModule} from '@angular/platform-browser';

// Mock component for bootstrapping <toaster-container></toaster-container>
Expand Down Expand Up @@ -42,7 +42,7 @@ describe('ToasterContainerComponent with sync ToasterService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [TestComponent, TestDynamicComponent],
imports: [ToastModule, BrowserModule]
imports: [ToasterModule, BrowserModule]
});

fixture = TestBed.createComponent(TestComponent);
Expand Down Expand Up @@ -586,7 +586,7 @@ describe('ToasterContainerComponent when included as a component', () => {
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [TestComponent, TestDynamicComponent],
imports: [ToastModule]
imports: [ToasterModule]
});
fixture = TestBed.createComponent(TestComponent);
});
Expand Down Expand Up @@ -817,7 +817,7 @@ describe('Multiple ToasterContainerComponent components', () => {
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [TestComponent],
imports: [ToastModule]
imports: [ToasterModule]
});
TestBed.overrideComponent(TestComponent,
{
Expand Down
2 changes: 1 addition & 1 deletion src/toast.module.ts → src/toaster.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ import {ToasterService} from './toaster.service';
providers: [ToasterService],
exports: [ToasterContainerComponent, ToastComponent],
})
export class ToastModule {}
export class ToasterModule {}
2 changes: 1 addition & 1 deletion src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"toaster-container.component.ts",
"toaster-container.component.spec.ts",
"toaster.service.ts",
"toast.module.ts",
"toaster.module.ts",
"../node_modules/typescript/lib/lib.es6.d.ts",
"../typings/jasmine/jasmine.d.ts"
]
Expand Down

0 comments on commit 95e64c3

Please sign in to comment.