-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Questions regarding development steps #5910
Comments
Strange, regarding the renamed CSS/JS (map) files, I just noticed there are indeed some changes, but Git marks them only as "renamed" – odd. The CSS file actually contains the changes I made in the corresponding sources. 👍 And the JS minification seems to be non-deterministic – minified identifiers aren't consistent across builds. So it seems the "renamed" built assets are fine minus being declared as "renamed" although they're actually "modified" and the slightly unnecessary diff noise due to the JS minification. |
Thanks for asking! As a small primer:
Thus, when you create a PR, always use
This may be surprising as it's not documented, because it is specific to our installation. Take the following pipe: mkdocs-material/tools/build/index.ts Lines 275 to 287 in de0c5b7
This observable will only emit when the How could we improve it? First, we could align the name of the folder with the docs where we mention So, not sure.
Well, you changed the sources, and the files with those funny looking hashes at the end are actually generated files (aka entrypoints). Since the files you changed are included by those files, their contents also changed, thus leading to new hashes. Why do we use hashes? That you don't have to tell your users to "trigger a full reload" to get the latest changes 😅 Ah well, happy old times. It's actually common practice, and all tools that bundle for the web recommend doing that.
That's a question you should ask a git professional. I think because the changes are so tiny compared to the size of the file, git considers the action to be a rename rather than a delete and add. But that's only my best guess.
That's something I'm hearing for the first time. It might be related to ordering of files, but that should be deterministic as well. We're using ESBuild and SASS for bundling, so maybe check back with the authors and maintainers of those projects if you have further questions regarding determinism. We're only taking the final output by those tools and compute a hash based on the files contents. I hope I could answer all questions and am closing this issue as resolved. If you have further questions, please use the discussion board |
Thanks for your detailed explanations! 🙇 I've submitted #5919 to update the docs about the name of the virtual env directory and some additional minor tweaks. I've also submitted #5920 to update the icon search index as it seems to have been outdated – a clean installation of the dependencies and running What do you think about also locking Python dependencies for development to make development environments deterministic? You're already using |
Description
I've stumbled over some issues when contributing to
mkdocs-material
and following the theme development instructions. When I set up the environment and then, without modification of the sources, build the theme, I see the followinggit status
output:Since I made no changes, I would have expected an empty change list.
When I run
npm run build:all
instead, I get this:Why has his file been deleted? 🤔
And when I make a small change in, e.g.,
src/assets/stylesheets/main/integrations/_mermaid.scss
andsrc/assets/javascripts/components/content/mermaid/index.css
(while working on #5824) and runnpm run build:all
, I get this:Why have the built/minified CSS (map) files been renamed? I would have expected their file contents to have changed because their sources have changed.
And finally, why have the built/minified JS (map) files been renamed? I haven't touched their sources at all.
Could you please help me understand what's going on, @squidfunk? 🙏
Related links
Proposed change
No response
Before submitting
The text was updated successfully, but these errors were encountered: