Skip to content

Commit

Permalink
feat: Live reload option for development (#177)
Browse files Browse the repository at this point in the history
Added an npm target to enable live reload: npm run devlive.

Closes
#155
  • Loading branch information
jeromecambon authored Feb 17, 2023
1 parent 3b20c04 commit d3c7610
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 28 deletions.
5 changes: 3 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This project produces the Antora UI bundle used by the https://github.com/bonita
repository to build the Bonita documentation website. +
It is based on the https://gitlab.com/antora/antora-ui-default[Antora Default UI].

📣 Want to see the them in action? Let's have a look at
📣 Want to see them in action? Let's have a look at:

- the https://bonitasoft.github.io/bonita-documentation-theme/[theme preview environment]
- the https://documentation.bonitasoft.com/[Bonita documentation production site]
Expand Down Expand Up @@ -50,7 +50,8 @@ When this event is received, a new Pull Request is created in the https://github

== Development

A static or live preview of the theme is available, run `npm run dev`. For more details, see the https://docs.antora.org/antora-ui-default/build-preview-ui/[build-preview-ui] documentation.
A static or live preview of the theme is available, run `npm run dev`, or `npm run devlive` to unable the live reload. For more details, see the https://docs.antora.org/antora-ui-default/build-preview-ui/[build-preview-ui] documentation. +
⚠️ Note that the live reload does not always work, so use it with caution. A restart of the browser, or running `npx browserslist@latest --update-db` when asked may help.

To build the bundle to be used in the Antora playbook, run `npm run bundle`.

Expand Down
188 changes: 162 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"scripts": {
"bundle": "gulp bundle",
"dev": "gulp preview",
"devlive": "cross-env LIVERELOAD=true gulp preview",
"preview:build": "gulp preview:build"
},
"devDependencies": {
Expand All @@ -24,6 +25,7 @@
"autoprefixer": "~9.7",
"browser-pack-flat": "~3.4",
"browserify": "~16.5",
"cross-env": "^7.0.3",
"cssnano": "~4.1",
"eslint": "~7.32.0",
"eslint-config-standard": "~14.1",
Expand Down

0 comments on commit d3c7610

Please sign in to comment.