From a91119447ac13a6581a8577431365cf6ef3540cf Mon Sep 17 00:00:00 2001 From: Mario Romano Date: Thu, 22 Sep 2016 11:21:19 +0100 Subject: [PATCH] add build demo doc --- ng2-components/README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/ng2-components/README.md b/ng2-components/README.md index 56ef91ae5f..63d49c2e4a 100644 --- a/ng2-components/README.md +++ b/ng2-components/README.md @@ -54,3 +54,38 @@ You can browse all the components at the following address: http://devproducts.alfresco.com/ + +### How to test a change to a generic component in its own demo + +Let's suppose that for some reason you have changed a component and you want to test this changes. +The example is based on the ng2-alfresco-login component, but you can use the same steps for any component. + + +1. Move inside the component folder and link it. +```sh + +cd ng2-alfresco-login +npm link + +``` + +2. Build the component with the watcher enabled. +```sh + +npm run build:w + +``` + +3. Move inside the demo folder and link the component to the local node_modules folder. +```sh + +cd demo +npm link ng2-alfresco-login + +``` + +4. Start the demo project. +```sh + +npm run start +``` \ No newline at end of file