Skip to content
This repository was archived by the owner on Jun 15, 2021. It is now read-only.

Commit eccb0b2

Browse files
committed
refactor: Renames facade to factory for accuracy.
BREAKING CHANGE: Imports of the facade should now import the factory.
1 parent 234b0f0 commit eccb0b2

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

readme.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
1. Install it with `npm i @js-entity-repos/memory`.
66
1. For each entity you will need to do the following.
77
1. [Create Entity interface](#entity-interface).
8-
1. [Create a facade config](#facade-config).
8+
1. [Create a factory config](#factory-config).
99
1. [Construct the facade](#construct-the-facade).
1010
1. [Use the facade](https://github.com/js-entity-repos/core/blob/master/docs/facade.md).
1111

@@ -20,17 +20,17 @@ export interface TodoEntity extends Entity {
2020
}
2121
```
2222

23-
### Facade Config
23+
### Factory Config
2424

2525
```ts
26-
import FacadeConfig from '@js-entity-repos/memory/dist/Config';
26+
import FactoryConfig from '@js-entity-repos/memory/dist/Config';
2727

2828
interface State {
2929
todos: TodoEntity[];
3030
}
3131

3232
const state: State = { todos: [] };
33-
const todoFacadeConfig: FacadeConfig = {
33+
const todoFactoryConfig: FactoryConfig = {
3434
defaultPaginationLimit: 100,
3535
entityName: 'todo',
3636
getEntities: () => state.todos,
@@ -41,7 +41,7 @@ const todoFacadeConfig: FacadeConfig = {
4141
### Construct the Facade
4242

4343
```ts
44-
import facade from '@js-entity-repos/memory/dist/facade';
44+
import factory from '@js-entity-repos/memory/dist/factory';
4545

46-
const todosFacade = facade(todoFacadeConfig);
46+
const todosFacade = factory(todoFactoryConfig);
4747
```

src/facade.test.ts renamed to src/factory.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import facadeTest from '@js-entity-repos/core/dist/tests';
22
import { TestEntity } from '@js-entity-repos/core/dist/tests/utils/testEntity';
3-
import facade from './facade';
3+
import factory from './factory';
44

55
interface State {
66
// tslint:disable-next-line:readonly-keyword
@@ -9,7 +9,7 @@ interface State {
99

1010
const state: State = { entities: [] };
1111

12-
facadeTest(facade({
12+
facadeTest(factory({
1313
defaultPaginationLimit: 100,
1414
entityName: 'Test Entity',
1515
getEntities: () => state.entities,
File renamed without changes.

0 commit comments

Comments
 (0)