0.9.0 • Published 5 years ago

@zeelo/corejs v0.9.0

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

FE Core

Adapters and Transformers

  • NON inherited entities:
    • The adapter implements both AdapterInterface and TransformerInterface.
    • The AdapterInterface will be used to adapt self data.
    • The TransformerInterface will be used to adapt data from the parent transformer if exists (when adapting mixed lists such as products list).

  • Inherited entities:

    • The adapter implements only AdapterInterface and its responsibility is using the proper injected adapter.
    • At the highest level we need only 1 transformer with the proper switch to call these adapters.
  • Use

    • If the data we are trying to transform is from a basic entity (EventProduct, Stop, Perk, ...) we are using the adapter and either the adapt method or the transform method (preferring the transform one so we can avoid the new entity call).
    • If the data we are trying to transform is from a parent entity (Product with type="event") we are using a factory with the EventProductAdapter injected. Inside the factory we will use a switch to determine which adapter we must use and then we will call the adapt method since this factory accepts only AdapterInterface.

Services

Every service will extend BaseEntityService since the logic is generic and reusable. Also we are typing the service with the proper entity to let the system (and the programmer) know what entity is being returned or used every time.

Clients

Every client will extend BaseEntityClient since the logic is generic and reusable. For clients we are only implementing the abstract method getBasepath() to let the system know where the endpoint starts.

Factories

The factories will be used to transform data from a mixed list or when the data comes from a parent entity and a type attribute (for example when retrieving data of an event product but the data is coming from a Products endpoint with the attribute type="product").

Scripts

Start

  • npm run start or npm start: Installs everything and launches webpack in dev mode.
  • npm run start:fresh: Removes node_modules and public folder and then runs npm start. This is mainly used for when changing some dependencies.

Webpack

  • npm run webpack:dev: Launches webpack in dev mode - watch and dev build. Use this one for dev mode when you don't need to install nor check dependencies.
  • npm run webpack:prod: Launches webpack in prod mode - production build.

Build

  • npm run build: Removes node_modules and public folder and then runs npm run webpack:prod for a fresh build production.

Tests

  • npm test or npm run test: Runs Jest testing.
0.9.0

5 years ago

0.8.5

5 years ago

0.8.4

5 years ago

0.8.3

5 years ago

0.8.2

5 years ago

0.8.1

5 years ago

0.8.0

5 years ago

0.7.9

5 years ago

0.7.8

6 years ago

0.7.7

6 years ago

0.7.6

6 years ago

0.7.5

6 years ago

0.7.4

6 years ago

0.7.3

6 years ago

0.7.2

6 years ago

0.7.1

6 years ago

0.7.0

6 years ago

0.6.0

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.12

6 years ago

0.4.11

6 years ago

0.4.10

6 years ago

0.4.9

6 years ago

0.4.8

6 years ago

0.4.7

6 years ago

0.4.6

6 years ago

0.4.5

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.9

6 years ago

0.3.8

6 years ago

0.3.7

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.65

6 years ago

0.0.64

6 years ago

0.0.63

6 years ago

0.0.62

6 years ago

0.0.61

6 years ago

0.0.60

6 years ago

0.0.59

6 years ago

0.0.58

6 years ago

0.0.57

6 years ago

0.0.56

6 years ago

0.0.55

6 years ago

0.0.54

6 years ago

0.0.52

6 years ago

0.0.51

6 years ago

0.0.50

6 years ago

0.0.49

6 years ago

0.0.48

6 years ago

0.0.47

6 years ago

0.0.44

6 years ago

0.0.43

6 years ago

0.0.42

6 years ago

0.0.41

6 years ago

0.0.40

6 years ago

0.0.39

6 years ago

0.0.38

6 years ago

0.0.37

6 years ago

0.0.36

6 years ago

0.0.35

6 years ago

0.0.34

6 years ago

0.0.33

6 years ago

0.0.32

6 years ago

0.0.31

6 years ago

0.0.30

6 years ago

0.0.29

6 years ago

0.0.28

6 years ago

0.0.27

6 years ago

0.0.26

6 years ago

0.0.25

6 years ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago