Skip to content

Commit

Permalink
docs: Improve getting started section
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien2p committed Mar 11, 2022
1 parent 5fdc11f commit b38cc7e
Show file tree
Hide file tree
Showing 51 changed files with 229 additions and 132 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,14 @@

# Getting started :rocket:

# Getting started :rocket:
Depending on your situation, pick the right getting started section.

## Existing medusa project

Run the following command in your terminal (The last version is {{ pkg.version }})

```bash
npm install {{ pkg.name }}
npm install medusa-extender
```

To benefit from all the features that the extender offers you, the usage of typescript is recommended.
Expand Down Expand Up @@ -145,6 +147,22 @@ medusa migrations run
npm run start
```

## From server starter

You can directly clone the `starters/server` to get started quickly.

Follow the next command to be ready in minutes

```bash
npx degit github:adrien2p/medusa-extender/starters/server#main server
cd server
npm i
npm run build
npm run start
```

That's it, your server is not up and running :rocket:

[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/cloudy.png)](#cli-medex)

# CLI `medex`
Expand Down
31 changes: 30 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
## Table of Contents

* [Getting started :rocket:](#getting-started-rocket)
* [Existing medusa project](#existing-medusa-project)
* [From server starter](#from-server-starter)
* [Features :monocle_face:](#features-monocle_face)
* [Non exhaustive list](#non-exhaustive-list)
* [Architecture](#architecture)
Expand Down Expand Up @@ -89,6 +91,13 @@

# Getting started :rocket:

Depending on your situation, pick the right getting started section.


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/cloudy.png)](#existing-medusa-project)

## Existing medusa project

Run the following command in your terminal (The last version is 1.5.1)

```bash
Expand Down Expand Up @@ -169,6 +178,26 @@ npm run start
```

That's it, your now ready to run your server :rocket:


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/cloudy.png)](#from-server-starter)

## From server starter

You can directly clone the `starters/server` to get started quickly.

Follow the next command to be ready in minutes

```bash
npx degit github:adrien2p/medusa-extender/starters/server#main server
cd server
npm i
npm run build
npm run start
```

That's it, your server is not up and running :rocket:


[![-----------------------------------------------------](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/cloudy.png)](#features-monocle_face)

Expand Down Expand Up @@ -915,7 +944,7 @@ In that repository, you will find two starters
Follow that link to go to the starter and see how to install it.
[Server](https://github.com/adrien2p/medusa-extender/tree/main/starters/server)

> The plugin module starter is provide a starting point to create your own plugin (shareable module).
> The plugin module starter is providing you a starting point to create your own plugin (shareable module).
Follow that link to go to the starter and see how to install it.
[Plugin module](https://github.com/adrien2p/medusa-extender/tree/main/starters/plugin-module)
Expand Down
10 changes: 5 additions & 5 deletions docs/classes/Medusa.Medusa-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Load medusa and apply all components

#### Defined in

[src/Medusa.ts:35](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/Medusa.ts#L35)
[src/Medusa.ts:35](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/Medusa.ts#L35)

## Properties

Expand All @@ -47,7 +47,7 @@ Load medusa and apply all components

#### Defined in

[src/Medusa.ts:28](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/Medusa.ts#L28)
[src/Medusa.ts:28](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/Medusa.ts#L28)

___

Expand All @@ -57,7 +57,7 @@ ___

#### Defined in

[src/Medusa.ts:29](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/Medusa.ts#L29)
[src/Medusa.ts:29](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/Medusa.ts#L29)

## Methods

Expand All @@ -77,7 +77,7 @@ ___

#### Defined in

[src/Medusa.ts:43](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/Medusa.ts#L43)
[src/Medusa.ts:43](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/Medusa.ts#L43)

___

Expand All @@ -91,4 +91,4 @@ ___

#### Defined in

[src/Medusa.ts:81](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/Medusa.ts#L81)
[src/Medusa.ts:81](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/Medusa.ts#L81)
12 changes: 6 additions & 6 deletions docs/classes/core_event_emmiter.Internals.CustomEventEmmiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ EventEmitter.constructor

#### Defined in

[src/core/event-emmiter.ts:21](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/core/event-emmiter.ts#L21)
[src/core/event-emmiter.ts:21](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/core/event-emmiter.ts#L21)

## Properties

Expand All @@ -51,7 +51,7 @@ EventEmitter.constructor

#### Defined in

[src/core/event-emmiter.ts:19](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/core/event-emmiter.ts#L19)
[src/core/event-emmiter.ts:19](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/core/event-emmiter.ts#L19)

## Methods

Expand Down Expand Up @@ -80,7 +80,7 @@ Emit an asynchrone event entity based and wait for the result.

#### Defined in

[src/core/event-emmiter.ts:80](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/core/event-emmiter.ts#L80)
[src/core/event-emmiter.ts:80](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/core/event-emmiter.ts#L80)

___

Expand Down Expand Up @@ -110,7 +110,7 @@ Register a new event handler.

#### Defined in

[src/core/event-emmiter.ts:31](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/core/event-emmiter.ts#L31)
[src/core/event-emmiter.ts:31](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/core/event-emmiter.ts#L31)

___

Expand All @@ -132,7 +132,7 @@ Apply all event handlers hold by the `listenerDescriptor`.

#### Defined in

[src/core/event-emmiter.ts:43](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/core/event-emmiter.ts#L43)
[src/core/event-emmiter.ts:43](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/core/event-emmiter.ts#L43)

___

Expand All @@ -146,4 +146,4 @@ ___

#### Defined in

[src/core/event-emmiter.ts:68](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/core/event-emmiter.ts#L68)
[src/core/event-emmiter.ts:68](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/core/event-emmiter.ts#L68)
2 changes: 1 addition & 1 deletion docs/classes/core_metadata_reader.Internals.CustomMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ Map.get

#### Defined in

[src/core/metadata-reader.ts:5](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/core/metadata-reader.ts#L5)
[src/core/metadata-reader.ts:5](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/core/metadata-reader.ts#L5)
12 changes: 6 additions & 6 deletions docs/classes/core_utils.Utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Utilities helper methods.

#### Defined in

[src/core/utils.ts:13](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/core/utils.ts#L13)
[src/core/utils.ts:13](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/core/utils.ts#L13)

## Methods

Expand Down Expand Up @@ -69,7 +69,7 @@ Attach a new subscriber to a specific entities.

#### Defined in

[src/core/utils.ts:40](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/core/utils.ts#L40)
[src/core/utils.ts:40](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/core/utils.ts#L40)

___

Expand All @@ -86,7 +86,7 @@ Display the logs that has been registered during the build time.

#### Defined in

[src/core/utils.ts:90](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/core/utils.ts#L90)
[src/core/utils.ts:90](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/core/utils.ts#L90)

___

Expand All @@ -111,7 +111,7 @@ Prepare the log to be shown to be consistent everywhere.

#### Defined in

[src/core/utils.ts:64](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/core/utils.ts#L64)
[src/core/utils.ts:64](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/core/utils.ts#L64)

___

Expand All @@ -134,7 +134,7 @@ Prepare the logs the show all available routes on the app.

#### Defined in

[src/core/utils.ts:77](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/core/utils.ts#L77)
[src/core/utils.ts:77](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/core/utils.ts#L77)

___

Expand Down Expand Up @@ -164,4 +164,4 @@ Since it is not possible to use multiple extend, you can use that utilities to a

#### Defined in

[src/core/utils.ts:20](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/core/utils.ts#L20)
[src/core/utils.ts:20](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/core/utils.ts#L20)
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:41](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/decorators/onMedusaEntityEvent.decorator.ts#L41)
[src/decorators/onMedusaEntityEvent.decorator.ts:41](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/decorators/onMedusaEntityEvent.decorator.ts#L41)

## Properties

Expand All @@ -55,7 +55,7 @@

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:39](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/decorators/onMedusaEntityEvent.decorator.ts#L39)
[src/decorators/onMedusaEntityEvent.decorator.ts:39](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/decorators/onMedusaEntityEvent.decorator.ts#L39)

___

Expand All @@ -65,7 +65,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:38](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/decorators/onMedusaEntityEvent.decorator.ts#L38)
[src/decorators/onMedusaEntityEvent.decorator.ts:38](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/decorators/onMedusaEntityEvent.decorator.ts#L38)

## Accessors

Expand All @@ -79,7 +79,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:49](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/decorators/onMedusaEntityEvent.decorator.ts#L49)
[src/decorators/onMedusaEntityEvent.decorator.ts:49](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/decorators/onMedusaEntityEvent.decorator.ts#L49)

___

Expand All @@ -93,7 +93,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:45](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/decorators/onMedusaEntityEvent.decorator.ts#L45)
[src/decorators/onMedusaEntityEvent.decorator.ts:45](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/decorators/onMedusaEntityEvent.decorator.ts#L45)

## Methods

Expand All @@ -120,7 +120,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:69](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/decorators/onMedusaEntityEvent.decorator.ts#L69)
[src/decorators/onMedusaEntityEvent.decorator.ts:69](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/decorators/onMedusaEntityEvent.decorator.ts#L69)

___

Expand All @@ -146,7 +146,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:57](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/decorators/onMedusaEntityEvent.decorator.ts#L57)
[src/decorators/onMedusaEntityEvent.decorator.ts:57](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/decorators/onMedusaEntityEvent.decorator.ts#L57)

___

Expand All @@ -173,7 +173,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:83](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/decorators/onMedusaEntityEvent.decorator.ts#L83)
[src/decorators/onMedusaEntityEvent.decorator.ts:83](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/decorators/onMedusaEntityEvent.decorator.ts#L83)

___

Expand All @@ -199,7 +199,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:65](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/decorators/onMedusaEntityEvent.decorator.ts#L65)
[src/decorators/onMedusaEntityEvent.decorator.ts:65](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/decorators/onMedusaEntityEvent.decorator.ts#L65)

___

Expand All @@ -226,7 +226,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:76](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/decorators/onMedusaEntityEvent.decorator.ts#L76)
[src/decorators/onMedusaEntityEvent.decorator.ts:76](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/decorators/onMedusaEntityEvent.decorator.ts#L76)

___

Expand All @@ -252,7 +252,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:61](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/decorators/onMedusaEntityEvent.decorator.ts#L61)
[src/decorators/onMedusaEntityEvent.decorator.ts:61](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/decorators/onMedusaEntityEvent.decorator.ts#L61)

___

Expand Down Expand Up @@ -280,7 +280,7 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:90](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/decorators/onMedusaEntityEvent.decorator.ts#L90)
[src/decorators/onMedusaEntityEvent.decorator.ts:90](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/decorators/onMedusaEntityEvent.decorator.ts#L90)

___

Expand All @@ -300,4 +300,4 @@ ___

#### Defined in

[src/decorators/onMedusaEntityEvent.decorator.ts:53](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/decorators/onMedusaEntityEvent.decorator.ts#L53)
[src/decorators/onMedusaEntityEvent.decorator.ts:53](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/decorators/onMedusaEntityEvent.decorator.ts#L53)
2 changes: 1 addition & 1 deletion docs/interfaces/core_types.MedusaMiddleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Describe a custom middleware instance.

#### Defined in

[src/core/types.ts:152](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/core/types.ts#L152)
[src/core/types.ts:152](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/core/types.ts#L152)
2 changes: 1 addition & 1 deletion docs/interfaces/core_types.Type.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ Function.constructor

#### Defined in

[src/core/types.ts:6](https://github.com/adrien2p/medusa-extender/blob/ef51195/src/core/types.ts#L6)
[src/core/types.ts:6](https://github.com/adrien2p/medusa-extender/blob/5fdc11f/src/core/types.ts#L6)
Loading

0 comments on commit b38cc7e

Please sign in to comment.