Comments (3)
Pull Requests welcome.
from webcompiler.
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.
@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
- 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.
- 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)
- Resulting CSS file only contains comments from @use dependencies HOT 1
- Feature: Group media queries HOT 1
- Issue compiling partial .scss files in folders HOT 1
- Extention is not correct working with @container instead @media
- Not working on Visual Studio Mac HOT 4
- Validation warning shown for valid css, how to turn this off ? HOT 1
- sass.cmd is not recognized as an internal or external command HOT 5
- Sourcemap in css has an absolute path HOT 1
- node-sass is now deprecated HOT 3
- Question: Looking for guidance using compiler/bundler with Razor Class Library (RCL) projects HOT 1
- Cannot compile SCSS with symlink'd or shorcut'd references HOT 1
- SCSS unit tests failing due to error in node package
- Can you add custom options parameter to SASS
- Don't get Web Compiler option on context menu. Is the extension limited to certain kinds of VS projects? HOT 5
- .min.js instead of .es5.js HOT 3
- Version 1.14.11 on Nuget HOT 2
- VS2022 Keeps Crashing HOT 7
- Extension often fails to respond for periods of time HOT 5
- Minifier strips units from 0fr. HOT 2
- Error when trying to minify a js that is over 100KB HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webcompiler.