Wakamai-Fondue / wakamai-fondue-site

Wakamai Fondue website
Apache License 2.0
45 stars 8 forks source link

fix: rename files properly #184

Closed Ryuno-Ki closed 1 month ago

Ryuno-Ki commented 1 month ago

There were two options on how to handle this. The chosen one pleases the linter.

Heeding your call. A second PR will be required in the engine repo as far as I can tell right now.

Signed-off-by: André Jaenisch andre.jaenisch@posteo.de

Ryuno-Ki commented 1 month ago

Build fails over a permission error:

 npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/Wakamai-Fondue/wakamai-fondue-engine.git
npm ERR! 
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

I don't have write access to this repo and cannot merge.

Ryuno-Ki commented 1 month ago

I looked further into the build problem as the engine repo checked out fine (build + lint + test) and read https://github.com/Pomax/lib-font/#how-do-i-use-this-with-webpack

Since you are using Webpack via Vue here I tried something and got a green build.

Allow me to quote from that article:

Second, if you're somehow still stuck with "needing" to bundle, consider switching to esbuild, which is remarkably straight forward to switch to from webpack, even with complex configurations, and puts your project on a modern and both (much) faster and better documented bundler instead. JS tooling like formatters, bundlers, and minifiers should not themselves be written in JS.

I can help you with the migration, I believe.

Ryuno-Ki commented 1 month ago

If you do not want to have a fallback: { zlib: false } then it would look like this:

             fallback: {
+                assert: require.resolve("assert/"),
                 fs: false,
-                zlib: false
+                stream: require.resolve("stream-browserify"),
+                util: require.resolve("util/"),
+                zlib: require.resolve("browserify-zlib")
             },

with these new dependencies:

Let me know if I shall commit and push it.

You cannot get rid of fallback: { fs: false } here.

RoelN commented 1 month ago

If you do not want to have a fallback: { zlib: false } then it would look like this:

             fallback: {
+                assert: require.resolve("assert/"),
                 fs: false,
-                zlib: false
+                stream: require.resolve("stream-browserify"),
+                util: require.resolve("util/"),
+                zlib: require.resolve("browserify-zlib")
             },

with these new dependencies:

* "browserify-zlib": "^0.2.0",

* "stream-browserify": "^3.0.0",

* "util": "^0.12.5",

Let me know if I shall commit and push it.

You cannot get rid of fallback: { fs: false } here.

So that keeps WOFF(2) decompression working? If so, let's go for it. Maybe in a new PR to separate it from these filename changes?

Ryuno-Ki commented 1 month ago

Separate sounds good. Because then you have a green build here to test and can check out the other PR and compare the builds.

Ryuno-Ki commented 1 month ago
git remote add ryuno-ki https://github.com/Ryuno-Ki/wakamai-fondue-site.git
git fetch ryuno-ki
git checkout repair-build
npm run build

(respectively with the other branch)

Ryuno-Ki commented 1 month ago

Competes with #185 now.

Ryuno-Ki commented 1 month ago

Force-pushed to update with master. I also applied prettier here.

Note, that this is the version with zlib: false!

Ryuno-Ki commented 1 month ago

@RoelN I'm surprised to find two different linters. The npm run lint is using different rules than Prettier. Sounds like worth to consolidate to me.

RoelN commented 1 month ago

@Ryuno-Ki Agreed, I didn't even realise that. But since this one is green, let's merge this! 😍