cmx-components
v2.6.4
Published
Clone package to your home directory
Downloads
19
Readme
Cmx-components
Clone package to your home directory
Run npm install
Adding a core component
Suppose we are working on myferitlome.com
and would like to add a Tooltip
component, which could also be used on celmatix.com
or future projects. To
work on this component with live reload enabled you will need to do the
following.
- Run
npm link
incmx-components
directory - Run
npm link cmx-components
from directory ofmyfertilome.com
repo - Run
npm start
in cmx-components to have webpack watch all files insrc
directory
When finished run the following
Ctrl + c
incmx-components
- Run
npm unlink
incmx-components
- Run
npm unlink cmx-components
inmyfertilome.com
What is npm link
When you run npm install
in the myfertilome.com
directory, npm looks at
dependencies
in package.json
file to identify all the packages it will need
to download into its node_modules
directory.
Since npm supports pointing packages to relative files we point cmx-components
relatively using "file://./../cmx-components"`.
When npm installs the cmx-components package it looks at the cmx-components
as
if it were any other npm package and copies it to myfertilome.com/node_modules
folder.
Using npm link
we override downloading to node_modules folder and instead have
it symlink to cmx-components
directory.