Skip to content

Commit

Permalink
doc(README): updated readme for main + also for logger
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlautier committed Aug 9, 2016
1 parent 23b2fba commit 2380e44
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 33 deletions.
41 changes: 22 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
[jspm]: http://jspm.io
[typings]: https://github.com/typings/typings

# ssv-ng2-core
# @ssv/ng2-core
[![Build status](https://ci.appveyor.com/api/projects/status/2e0an5hvxtfs08mf?svg=true)](https://ci.appveyor.com/project/chiko/ssv-ng2-core)
[![Build status](https://ci.appveyor.com/api/projects/status/2e0an5hvxtfs08mf/branch/master?svg=true)](https://ci.appveyor.com/project/chiko/ssv-ng2-core/branch/master)
[![bitHound Overall Score](https://www.bithound.io/github/sketch7/ssv-ng2-core/badges/score.svg)](https://www.bithound.io/github/sketch7/ssv-ng2-core)
[![npm version](https://badge.fury.io/js/ssv-ng2-core.svg)](https://badge.fury.io/js/ssv-ng2-core)
[![npm version](https://badge.fury.io/js/%40ssv%2Fng2-core.svg)](https://badge.fury.io/js/%40ssv%2Fng2-core)

Sketch7 Angular2 core components and utilities
Core utilities and services for angular2, such as logger.

In order to contribute please read the [Contribution guidelines][contribWiki].

Expand All @@ -27,7 +27,7 @@ In order to contribute please read the [Contribution guidelines][contribWiki].

Get library via [npm]
```bash
npm install ssv-ng2-core --save
npm install @ssv/ng2-core --save
```

TypeScript Typings via [typings]
Expand All @@ -36,33 +36,37 @@ typings install github:sketch7/ssv-ng2-core --save
```

# Usage
```ts
import {LoggerFactory, ILog} from "ssv-ng2-core";


private logger: ILog;
## Register module

constructor(
loggerFactory: LoggerFactory
) {
this.logger = loggerFactory.getInstance(id);
```ts
import {CoreModule} from "@ssv/ng2-core";

@NgModule({
imports: [
CoreModule
],
declarations: [
AppComponent
]
}
export class AppModule {
}

```
## Logger
Read more how to use [Logger](./src/logging/README.md).
# Features
- [Logger](./src/logging/README.md)
# Getting Started
## Setup Machine for Development
Install/setup the following:
- NodeJS v4+
- NodeJS v5+
- Visual Studio Code or similar code editor
- TypeScript 1.8+
- SourceTree, SmartGit (or similar)
- Git + SourceTree, SmartGit or similar (optional)
- Ensure to install **global NPM modules** using the following:
Expand All @@ -73,8 +77,7 @@ npm install -g git gulp typings karma-cli
### Cloning Repo
- Open SourceTree
- Clone project repo from [project git][projectGit]
- Run `git clone https://github.com/sketch7/ssv-ng2-core.git`
- Switch to `develop` branch


Expand Down
17 changes: 3 additions & 14 deletions src/logging/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
# Logger Sample
# Logger
A minimal logger with a structured log format and replacable LoggingService which logs to console.

## Register providers

```ts

import {LOGGER_PROVIDERS} from "ssv-ng2-core";

// within bootstrap or AppComponent
providers: [
LOGGER_PROVIDERS
]

```

## Usage

```ts
import {LoggerFactory, ILog} from "ssv-ng2-core";
import {LoggerFactory, ILog} from "@ssv/ng2-core";

const id = "auth.service";

Expand Down

0 comments on commit 2380e44

Please sign in to comment.