-
Notifications
You must be signed in to change notification settings - Fork 87
chore: use private package for dev pages, add build script #9995
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
Conversation
f861bfc
to
2e0f6a1
Compare
f6bb227
to
916aab8
Compare
916aab8
to
0744a13
Compare
@@ -48,9 +48,10 @@ export const ElementMixin = (superClass) => | |||
window.Vaadin.registrations.push(this); | |||
registered.add(is); | |||
|
|||
if (window.Vaadin.developmentModeCallback) { | |||
const callback = window.Vaadin.developmentModeCallback; | |||
if (callback) { |
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.
Without this change, I was getting the following error in the dist
:
element-mixin-brp7V6lp.js:16 Uncaught TypeError: Cannot read properties of undefined (reading 'vaadin-usage-statistics')
at f._callback (element-mixin-brp7V6lp.js:16:525)
at element-mixin-brp7V6lp.js:11:1075
Storing the callback into variable fixes it.
cf458a6
to
7cedcef
Compare
"icons": "lerna run icons", | ||
"lint": "npm-run-all --parallel lint:*", | ||
"lint:css": "stylelint --ignore-path .gitignore \"packages/**/src/**/*.js\" \"packages/**/*.css\" \"dev/**/*.html\"", | ||
"lint:js": "eslint", | ||
"lint:types": "tsc", | ||
"postinstall": "patch-package", | ||
"prepare": "husky", | ||
"serve:dist": "web-dev-server --app-index dist/index.html --open", |
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 was a leftover from the old API docs which I missed to remove in #9975.
7cedcef
to
8bb680d
Compare
"postcss": "^8.1.0", | ||
"postcss-import": "^16.1.1", | ||
"rimraf": "^6.0.1", | ||
"rollup": "^4.46.2" |
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.
Also upgraded rollup
to the latest version in yarn.lock (we had a pretty old one installed).
wds-utils.js
Outdated
return html.replace(/<\/body>/u, `${preventFouc}\n</body>`); | ||
} | ||
|
||
export function generateListing(html, dir) { |
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.
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.
Changed to use --root-dir dev
- now dev pages will open as follows:
http://localhost:8000/
- index pagehttp://localhost:8000/button.html
IMO it's ok since we no longer have index.html
in the root level workspace, and we no longer use web-dev-server for API docs after removal of old docs based on <iron-component-page>
.
UPD: modified the web-dev-server.config..js
to not break with yarn debug
as in that case, dev pages are still available via old paths like http://localhost:8000/dev/button.html
. I think it's probably fine.
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.
Looks like --root-dir
dev breaks Lumo / Aura CSS using <link rel="stylesheet">
from parent folders, I'll investigate further how to make it work.
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.
Found a better solution using <base>
tag which is only needed for localhost:8000/dev
without a trailing slash. Reverted changes for --root-dir
and modified the plugin to only inject <base>
if needed.
Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
a54b914
to
f0b2911
Compare
f0b2911
to
1efe442
Compare
|
Description
dev
folder to be another package in the monorepo and added build scriptdev/index.html
and adding FOUC styles into separate fileenforceThemePlugin()
replacements to not remove CSS matching../
Type of change
How to test