From 4200063d0403dc5b222bba634844e28ddd7f8729 Mon Sep 17 00:00:00 2001 From: Matteo Basso Date: Thu, 14 Jul 2016 09:32:04 +0200 Subject: [PATCH] Fix docs --- docs/api/README.md | 2 +- docs/basics/Publishing.md | 2 +- docs/basics/Subscribing.md | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api/README.md b/docs/api/README.md index 1c69958..e988d96 100644 --- a/docs/api/README.md +++ b/docs/api/README.md @@ -1,6 +1,6 @@ # Api Reference -As described before Refraction exports only one class, you need a set of other library to use all its functionality, see [Ecosystem](../docs/introduction/Ecosystem.md) for more information. +As described before Refraction exports only one class, you need a set of other library to use all its functionality, see [Ecosystem](../introduction/Ecosystem.md) for more information. Here is the list of methods that you can use on its instance: - [constructor(middlewares = [])](/Constructor.md) diff --git a/docs/basics/Publishing.md b/docs/basics/Publishing.md index 08ede4f..3e6d275 100644 --- a/docs/basics/Publishing.md +++ b/docs/basics/Publishing.md @@ -1,6 +1,6 @@ # Publishing -Publishing events is the only way that your application should use to allow modules communicating. Essentially we have to define some [channels](/docs/Glossary.md) on which we can pass values. For example if we want to communicate to other modules that a user logged in, we can define a channel called `onUserLogin` that bring the username. This looks like this: +Publishing events is the only way that your application should use to allow modules communicating. Essentially we have to define some [channels](../Glossary.md) on which we can pass values. For example if we want to communicate to other modules that a user logged in, we can define a channel called `onUserLogin` that bring the username. This looks like this: ```js refractionInstance.publish('onUserLogin', username); diff --git a/docs/basics/Subscribing.md b/docs/basics/Subscribing.md index 87db74c..5055158 100644 --- a/docs/basics/Subscribing.md +++ b/docs/basics/Subscribing.md @@ -1,6 +1,6 @@ # Subscribing -After that we have prepared Refraction and we have defined channels, we have to subscribe something to these channels. In Refraction we can use [subscribe](/docs/api/Subscribe.md) to do this. +After that we have prepared Refraction and we have defined channels, we have to subscribe something to these channels. In Refraction we can use [subscribe](../api/Subscribe.md) to do this. Subscribe function accept an Object that have a series of properties named as the channel that will handle. The handlers accept only one parameter that is the payload of the request. Let's make an example. If we have a module that publish on channel `onUserLogin` the username (payload), I have to define my subscriber in this way: diff --git a/package.json b/package.json index 2832199..e1fcabe 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "docs:clean": "rimraf _book", "docs:prepare": "gitbook install", "docs:watch": "npm run docs:prepare && gitbook serve", - "docs:build": "npm run docs:prepare && rm -rf _book && gitbook build && cp docs/Example.png _book/gitbook/images && cp docs/DataFlow.png _book/gitbook/images", + "docs:build": "npm run docs:prepare && rm -rf _book && gitbook build && cp docs/images/Example.png _book/gitbook/images && cp docs/images/DataFlow.png _book/gitbook/images", "docs:publish": "npm run docs:build && gh-pages -d _book" }, "repository": {