-
Notifications
You must be signed in to change notification settings - Fork 403
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
Conversation
@@ -5,16 +5,6 @@ | |||
module.exports = () => ({ | |||
plugins: [ | |||
require('postcss-import'), | |||
require('postcss-preset-env')({ |
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.
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) => { |
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.
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', |
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.
and this copies rewritten ui-kit's output to the ui-showcase directory so the changes are reflected immediately
9c437f9
to
4c30380
Compare
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.
lgtm
4c30380
to
2c6e7cd
Compare
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 featureAlso this allows to quickly create templates for new ui-kit components
Example of usage