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

Publish final bundles in the dist/ folder #1423

Closed
acalvo opened this issue May 21, 2020 · 6 comments · Fixed by #1439 or #1777
Closed

Publish final bundles in the dist/ folder #1423

acalvo opened this issue May 21, 2020 · 6 comments · Fixed by #1439 or #1777
Assignees
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@acalvo
Copy link

acalvo commented May 21, 2020

Is your feature request related to a problem? Please describe.
I wanted to set Mermaid as a dependency of a Hugo theme. To do so, Hugo allows adding Hugo Modules that are like Go Modules: you put the repo of the dependency and access its content. The problem is that this repo doesn't provide a copy of mermaid[.min].js in its dist/ folder. That is only available in the npmjs package. That's why it can't be used as a Hugo/Go Module.

Describe the solution you'd like
Commit mermaid[.min].js in the dist/ folder. Either everywhere (master/develop/etc) or just in release/X branches.

Describe alternatives you've considered
For the time being, I'm forced to copy the JS file by hand to my project, which bypasses all the benefits of a proper dependency version management like Go Modules (same as npm, etc.)

@acalvo acalvo added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels May 21, 2020
@GDFaber
Copy link
Member

GDFaber commented May 22, 2020

We should do this. I'd also like to extend yarn build so it creates the minifed version as well in one go.

@GDFaber GDFaber self-assigned this May 22, 2020
@knsv knsv closed this as completed in #1439 Jun 2, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jun 2, 2020
@knsv
Copy link
Collaborator

knsv commented Aug 8, 2020

Hi!

We are currently having compiled bundles included in git for this very reason. However ... this is causing a fair amount of problems for us in development as this often generates conflicts. So in shot, we want to adjust this to a less error prone approach.

@acalvo Is there a reason you can not use mermaid from a cdn, like the url below for instance?
"//cdn.jsdelivr.net/npm/mermaid@8.6.4/dist/mermaid.min.js"

If not we need to find a way to automate this in our release handling and keep the compiled bundles in the release branches.

I am open for comments, ideas and suggestions.

@acalvo @GDFaber @jgreywolf

@knsv knsv reopened this Aug 8, 2020
@github-actions github-actions bot unlocked this conversation Aug 8, 2020
@acalvo
Copy link
Author

acalvo commented Aug 10, 2020

Hi! Sorry for the delay in my answer.

@acalvo Is there a reason you can not use mermaid from a cdn, like the url below for instance?
"//cdn.jsdelivr.net/npm/mermaid@8.6.4/dist/mermaid.min.js"

Unfortunately, the policy in the project I'm working at is that we can not link external CDNs. Everything should be served from our own CDN.

I understand the problems you are facing. As I said in my first message I need this in order to use mermaid as a Go module, which simplifies and unifies the dependency version management of our Hugo theme. But of course there are other alternatives (copy-pasting the mermaid bundle in my project directly) which I'll have to do if you roll back these changes.

A solution in between both of them, like just publish the bundles in the release/x.x.x branches, would work great for me too.

Up to you, though. If I'm the only one that has faced this need, I understand if you decide to just roll back the changes completely :).

@GDFaber
Copy link
Member

GDFaber commented Aug 20, 2020

The current approach indeed causes trouble, sorry for that. I've been thinking about other ways to deliver the "dists" but did not get far. Should we revert it and take our time to think again?

@acalvo
Copy link
Author

acalvo commented Aug 24, 2020

OK, go ahead :).

We will stick with v8.7.0 for the time being; hope we find a better way to deliver the dist/ folder again in the future :).

@GDFaber
Copy link
Member

GDFaber commented Nov 17, 2020

Alright, then I'll reset the ignore file to stop distributing the build files (starting with the next release) until we can come up with something better.

GDFaber added a commit that referenced this issue Nov 17, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Nov 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request
Projects
None yet
3 participants