Skip to content

Commit 0ae00cc

Browse files
authored
chore: switch to @abraham/reflection; refactor unit test config (#2)
* chore: correct uni tests, switch to @abraham/reflection * chore: update readme and package info * chore: update both readme files * chore: update readme * chore: correct link * chore: update version
1 parent c92af45 commit 0ae00cc

File tree

14 files changed

+213
-461
lines changed

14 files changed

+213
-461
lines changed

README.MD

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
# Angular 2 JSON API
22

3-
A lightweight Angular 2 adapter for [JSON API](http://jsonapi.org/)
3+
Fork of [angular2-jsonapi](https://github.com/ghidoz/angular2-jsonapi)
44

5-
[![Build Status](https://travis-ci.org/ghidoz/angular2-jsonapi.svg?branch=master)](https://travis-ci.org/ghidoz/angular2-jsonapi)
6-
[![Coverage Status](https://coveralls.io/repos/github/ghidoz/angular2-jsonapi/badge.svg?branch=master)](https://coveralls.io/github/ghidoz/angular2-jsonapi?branch=master)
7-
[![Angular 2 Style Guide](https://mgechev.github.io/angular2-style-guide/images/badge.svg)](https://angular.io/styleguide)
8-
[![Dependency Status](https://david-dm.org/ghidoz/angular2-jsonapi.svg)](https://david-dm.org/ghidoz/angular2-jsonapi)
9-
[![devDependency Status](https://david-dm.org/ghidoz/angular2-jsonapi/dev-status.svg)](https://david-dm.org/ghidoz/angular2-jsonapi#info=devDependencies)
10-
[![npm version](https://badge.fury.io/js/angular2-jsonapi.svg)](https://badge.fury.io/js/angular2-jsonapi)
5+
A lightweight Angular 2 adapter for [JSON API](http://jsonapi.org/)
116

127
## Table of Contents
138
- [Introduction](#Introduction)
@@ -62,12 +57,12 @@ Moreover, using Angular2 and Typescript, we like to interact with classes and mo
6257

6358
To install this library, run:
6459
```bash
65-
$ npm install angular2-jsonapi --save
60+
$ npm install @michalkotas/angular2-jsonapi --save
6661
```
6762

6863
Add the `JsonApiModule` to your app module imports:
6964
```typescript
70-
import { JsonApiModule } from 'angular2-jsonapi';
65+
import { JsonApiModule } from '@michalkotas/angular2-jsonapi';
7166

7267
@NgModule({
7368
imports: [
@@ -115,7 +110,7 @@ Firstly, create your `Datastore` service:
115110
- Pass the `HttpClient` depencency to the parent constructor.
116111

117112
```typescript
118-
import { JsonApiDatastoreConfig, JsonApiDatastore, DatastoreConfig } from 'angular2-jsonapi';
113+
import { JsonApiDatastoreConfig, JsonApiDatastore, DatastoreConfig } from '@michalkotas/angular2-jsonapi';
119114

120115
const config: DatastoreConfig = {
121116
baseUrl: 'http://localhost:8000/v1/',
@@ -145,7 +140,7 @@ Then set up your models:
145140
- (optional) Define your [Metadata](#metadata)
146141

147142
```typescript
148-
import { JsonApiModelConfig, JsonApiModel, Attribute, HasMany, BelongsTo } from 'angular2-jsonapi';
143+
import { JsonApiModelConfig, JsonApiModel, Attribute, HasMany, BelongsTo } from '@michalkotas/angular2-jsonapi';
149144

150145
@JsonApiModelConfig({
151146
type: 'posts'
@@ -527,7 +522,7 @@ Error handling is done in the `subscribe` method of the returned Observables.
527522
If your server returns valid [JSON API Error Objects](http://jsonapi.org/format/#error-objects) you can access them in your onError method:
528523

529524
```typescript
530-
import {ErrorResponse} from "angular2-jsonapi";
525+
import {ErrorResponse} from "@michalkotas/angular2-jsonapi";
531526

532527
...
533528

@@ -590,4 +585,4 @@ This library is inspired by the draft of [this never implemented library](https:
590585

591586
## License
592587

593-
MIT © [Daniele Ghidoli](http://danieleghidoli.it)
588+
MIT

angular.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@
1919
"test": {
2020
"builder": "@angular-devkit/build-angular:karma",
2121
"options": {
22-
"main": "projects/angular2-jsonapi/src/test.ts",
2322
"tsConfig": "projects/angular2-jsonapi/tsconfig.spec.json",
24-
"karmaConfig": "projects/angular2-jsonapi/karma.conf.js",
25-
"sourceMap": true
23+
"polyfills": [
24+
"zone.js",
25+
"zone.js/testing",
26+
"@abraham/reflection"
27+
]
2628
}
2729
},
2830
"lint": {

0 commit comments

Comments
 (0)