Skip to content
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

build: added dev server for ui kit development #3720

Merged
merged 3 commits into from
Jul 31, 2024
Merged

Conversation

berezinant
Copy link
Contributor

@berezinant berezinant commented Jul 31, 2024

This allows to run npm run start:ui-kit in terminal and see ui-showcase's version of Dokka in browser right away and then develop ui kit components as usual frontend component enjoing live-reload feature

image

Also this allows to quickly create templates for new ui-kit components
Example of usage
image

@berezinant berezinant added enhancement An issue for a feature or an overall improvement format: html An issue/PR related to Dokka's default HTML output format UI Kit labels Jul 31, 2024
@@ -5,16 +5,6 @@
module.exports = () => ({
plugins: [
require('postcss-import'),
require('postcss-preset-env')({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be not working and only producing a waring about unknown postcss features options so I just removed it

directory: '../../dokka-integration-tests/gradle/build/ui-showcase-result',
},
devMiddleware: {
writeToDisk: (filePath) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this forces webpack to rewrite ui-kit's output on every dev server reload

onDoneWatch: {
scripts: [
'echo "Done rebuild, coping files to dokka-integration-tests"',
'cp -r ../plugin-base/src/main/resources/dokka/ui-kit ../../dokka-integration-tests/gradle/build/ui-showcase-result',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this copies rewritten ui-kit's output to the ui-showcase directory so the changes are reflected immediately

@berezinant berezinant force-pushed the ui-kit-dev-server branch 2 times, most recently from 9c437f9 to 4c30380 Compare July 31, 2024 14:31
@berezinant berezinant requested a review from krutilov July 31, 2024 14:32
Copy link

@krutilov krutilov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@berezinant berezinant merged commit e3f9e50 into master Jul 31, 2024
13 checks passed
@berezinant berezinant deleted the ui-kit-dev-server branch July 31, 2024 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An issue for a feature or an overall improvement format: html An issue/PR related to Dokka's default HTML output format UI Kit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants