Git Product home page Git Product logo

Comments (3)

failwyn avatar failwyn commented on July 18, 2024

Pull Requests welcome.

from webcompiler.

garyhuntddn avatar garyhuntddn commented on July 18, 2024

Hi all - I've had a go at updating the code to support OS X + Linux. The implementation is 95% working. See #82

from webcompiler.

Velociraptor45 avatar Velociraptor45 commented on July 18, 2024

@failwyn Is it ok if I disable node-sass for Unix? It's deprecated, and I can't get the latest version to install or run under Unix. Users will still have the default (Dart) Sass compiler that's recommended in the node-sass repo's description.

Whilst I'm not really a web dev and thus not so familiar with the sass development in the past, I'd advocate for dropping node-sass support entirely (in a different issue/pr). This has to do with the way the node_modules folder is created. The build/build.cmd script pre-installs all the NPM packages locally & zips all of them. This zip then gets released with the NuGet package - and that's where the issue lies: The platform that compiles the NuGet package defines the NPM packages that get released - for any execution platform.
To be able to be fully compatible with Unix, there's a build/build.sh script now that does the same for Unix - but when we remove node-sass from the installation list in the shell script (because the installation¹ fails on Unix), we'd release different NPM packages, depending on the platform where the NuGet package is compiled.

This would mean (assuming we'd disable the node-sass execution in the code and tell the user it's unavailable for Unix):

/ Release on Unix Release on Windows
Run on Unix all fine (not supported) all fine (not supported)
Run on Windows error because package is not
in node_modules (although supported)
all fine (supported)

But when I understood it correctly, you'd compile and release from Windows anyway. This would circumvent the problem for now.

To eliminate the problem, we could do one of two things

  1. I don't know what your long-term plans with the package's architecture are, but we'd have to get to a point where the NuGet package doesn't bring all of its NPM package dependencies in a zip but rather installs them locally on the fly (but I haven't looked deeper into this as it's out of scope for this issue). The Windows version would then install node-sass, the Unix one not.
  2. Drop node-sass support for the whole project

As I already wrote, I'm in favor of option 2 as node-sass is deprecated anyway and having different feature sets for different platforms doesn't feel right. But that's nothing that has to be decided now, as long as you're fine with disabling node-sass for Unix and you continue to compile the released NuGet package on Windows.

¹ It's not just the native installation on Unix - also running the Windows-compiled NuGet package on Unix doesn't work for node-sass

from webcompiler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.