-
Notifications
You must be signed in to change notification settings - Fork 29
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
Use sass (dart-sass) instead of node-sass #196
Comments
@blurfx Could you assign this issue to me? I'll install sass and update any other libraries like typescript and eslint |
After updating typescript version, I found type errors in /**
* {@linkcode https://github.com/bevacqua/dragula/blob/e0bcdc72ae8e0b85e17f154957bdd0cc2e2e35db/dragula.js#L498}
*/
export function touchy(el: EventTarget, event: Function, type: MouseType, fn: (evt: TouchyEvent) => void) {
if (global.navigator.pointerEnabled) { // 🚨🚨🚨🚨🚨🚨🚨
event(el, pointers[type], fn);
} else if (global.navigator.msPointerEnabled) { // 🚨🚨🚨🚨🚨🚨🚨
event(el, microsoft[type], fn);
} else {
event(el, touch[type], fn);
event(el, type, fn);
}
} So I've looked into dragula project and found function U(e, t, n, o) {
r.navigator.pointerEnabled
? k[t](
e,
{
mouseup: 'pointerup',
mousedown: 'pointerdown',
mousemove: 'pointermove',
}[n],
o,
)
: r.navigator.msPointerEnabled
? k[t](
e,
{
mouseup: 'MSPointerUp',
mousedown: 'MSPointerDown',
mousemove: 'MSPointerMove',
}[n],
o,
)
: (k[t](
e,
{
mouseup: 'touchend',
mousedown: 'touchstart',
mousemove: 'touchmove',
}[n],
o,
),
k[t](e, n, o));
} Like this, I think we need to declare our own navigator type in the project. |
@gollumnima Initially, we wrote the code to support old browsers |
If we delete the code, I think it's better to split the pr. Even if we use 'any' type |
note: please use |
@blurfx Sorry for being late. I was running out of time, so I requested a pr without permission. I simply modified package.json and uploaded it. |
Description:
Use
sass(dart-sass)
instead ofnode-sass
.Why:
node-sass
is dependent onlibsass
, which is written in c/c++, so we have to compile usingnode-gyp
, which creates a dependence on the node version.libsass
andnode-sass
is deprecated. See https://sass-lang.com/blog/libsass-is-deprecateddart-sass
, and as far as I know, it is drop-in replacement fornode-sass
.The text was updated successfully, but these errors were encountered: