Pizzacus / satania.moe

Satania IS the BEST waifu, no really, she is, if you don't believe me, this website will convince you
https://satania.moe/
Other
608 stars 57 forks source link

Some updates #40

Open e965 opened 5 years ago

e965 commented 5 years ago
Pizzacus commented 5 years ago

Okay, so I wanna clarify that both fetch wasn't used and yaml is imported like that for the same reason, back when I made this, satania.moe wasn't running on webpack (actually, I don't think webpack was even popular back then) so I did not use fetch to ensure we were compatible with IE (which is still used a lot by our Chinese visitors) and imported YAML from an URL because I had no other ways to manage dependencies back then lol.

Now it would be better to put YAML as a dependency and add a fetch pollyfill.

Also I'm not sure about what you're doing with gulp-rename there?

e965 commented 5 years ago

Also I'm not sure about what you're doing with gulp-rename there?

In the current version of the project, the build paths of some files are broken (e.g. ./dist/src/assets/favicon.jpg instead of ./dist/favicon.jpg). I fixed it.

Pizzacus commented 5 years ago

(forget the last message I didn't get what you meant)

No this is the intended file structure.

As with most Gulp projects, things in src/ go into dist/, I put assets at the root just because there is no reason not to do that in the built website

Pizzacus commented 5 years ago

Or if you meant that for you, things go into ./dist/src/, well, that's weird because it doesn't do it for me

image

(I'm not sure if you meant by "(e.g. ./dist/src/assets/favicon.jpg instead of ./dist/favicon.jpg)" that it's what the change does or if it's what the current script does)

e965 commented 5 years ago

¯\(ツ)

(node 10.12.0, npm 6.4.1)

Pizzacus commented 5 years ago

Is your working dir (the dir you are cd into) the root of the satania.moe dir?

No wait it does look like it (I am really terrible today oh my god)

e965 commented 5 years ago

My working dir is the one into which I have cloned the git repository.

Pizzacus commented 5 years ago

I have found the problem, it's the use of path.join on globs that makes Gulp confused.

Normally, Gulp can find the "parent" of a Glob, so for instance, in owo/uwu/**/*.js, the parent is owo/uwu, so it is not added when you do gulp.dest.

But the Globs are generated with path.join so on windows, that separates folders with the backslas, while Globs always separate folders with the forward slash.

Solution: path.join will no longer be used to create globs, Gulp's cwd option will be used to do it properly

This will be fixed in an upcoming commit