mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-06-14 13:36:33 +02:00
Fix and update docs.
This commit is contained in:
22
docs/development.md
Normal file
22
docs/development.md
Normal file
@ -0,0 +1,22 @@
|
||||
Sooner or later you will face with situation when you want/need to make some changes in the library.
|
||||
Then the most important tool for you it's [`npm link`](https://docs.npmjs.com/cli/link).
|
||||
|
||||
Please, notice that it will not work if you link library just from root of the repo. It happens due to location of
|
||||
sources `./src`. You need to pack library first `make pack` and then link it from `./dist` directory.
|
||||
|
||||
Yeah it's not such comfortable solution for development. But it can fixed by writing small script similar as `make pack`
|
||||
but with linking every file and directory from `./src` to the some directory and linking then from it. Notice that you
|
||||
need to link `package.json` and `package-lock.json` as well.
|
||||
|
||||
So step by step:
|
||||
|
||||
```bash
|
||||
make pack;
|
||||
cd dist;
|
||||
npm link;
|
||||
|
||||
cd $project_dir/js # Navigate to JS directory of the project where you want to link the library
|
||||
npm link foris
|
||||
```
|
||||
|
||||
And that's it ;)
|
@ -1 +1,4 @@
|
||||
Foris JS library is set of componets and utils for Foris JS application and plugins.
|
||||
Foris JS library is set of components and utils for Foris JS application and plugins.
|
||||
|
||||
Please notice that all of these components or utils are used in reForis and plugins. If you like to study by example I would
|
||||
recommend to full-text search these repos.
|
||||
|
Reference in New Issue
Block a user