-
-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding FE dev instructions #46
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,6 +107,20 @@ User can choose between 2 types of installations: | |
|
||
_N.B.: Ports can be customized in advanced options._ | ||
|
||
## Rebuild static files (for frontend development) | ||
|
||
To immediately see your changes (in the `kpi` repository) live you need to run `npm run watch` to rebuild static files on the fly: | ||
|
||
``` | ||
$kodo-docker> docker-compose -f docker-compose.frontend.yml -f docker-compose.frontend.override.yml run -p 3000:3000 --rm kpi npm run watch | ||
``` | ||
|
||
Keep in mind that you need to continue running `npm run watch` to have static files be served continuously. Once stopped, static files won't be found anymore until you restart the `npm watch` or rebuild the container using | ||
|
||
``` | ||
$kobo-install> python run.py --build-kpi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would add two other lines:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @noliveleger, restarting isn't sufficient to use a newly-built image.
Instead, I'd suggest
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks |
||
``` | ||
|
||
## Tests | ||
|
||
Tests can be run with `tox`. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to @jnm work, this could be simplified to:
$kobo-install> ./run.py -cf run -p 3000:3000 --rm kpi npm run watch
To use this new option,
two-databases
is merged.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably need some docs related to https://www.flowdock.com/app/kobotoolbox/kobo/threads/oHknJLFhaDrfnSUtNXY2QNoxhCK (maybe applies only to old installs?)