Comments (11)
Hi!
The issue might be here:
// Adds a directory to sass load path (default is empty):
loadPath project.file ('sass-lib')
loadPath project.file ('/var/lib/compass')
Those are meant to add sass libraries to the load path. If you aren’t using any library, you shouldn’t add anything. And if you do are using a sass library, make sure to point to its correct location. It seems dart-sass
will fail if directories on its load path do not exist.
from sass-gradle-plugin.
Thanks, I've commented those two lines out, but when I run task compileSass
, the progress bar starts cycling non-stop. Is this supposed to happen, since it's monitoring the specified file folders?
Best Regards!
from sass-gradle-plugin.
Hi @eframsergio!
I’m not sure what the NetBeans UI should display, but yes, with the watch ()
option you’ve enabled, the task watches for changes in the source folder and will recompile whenever they change. The default behavior, without that option, is just to compile files from source to destination folder once, and then terminate.
As a side note, while this should work, I wouldn’t recommend having build outputs under the src
folder. Files under this folder are supposed to be under version control, and the CSS output of the SASS compilation, well, isn’t. Also, the war
task may pickup files under the src/main/webapp
directory before the compileSass
task is ran.
Without any option set, my plugin will compile any sass file under src/main/sass
to a directory in the build folder (build/sass
) and configure the war
task to pickup files there and put them at the root of the generated war. If you want the CSS to be available under resources/layout/css
in the web app, I recommend you to use the plugin defaults and move your sass files to src/main/sass/resources/layout/css
.
from sass-gradle-plugin.
Hi @EtienneMiret,
Thank you very much for your prompt responses. I still wasn't able to make it work at this moment.
Nothing seems to happen, even when I move sass folder in default expected location.
I will try to get back to it soon.
Thanks!
from sass-gradle-plugin.
Hi @eframsergio,
I’m sorry to ear you’re still struggling. Maybe have a look at the samples and just uploaded in PR #12 and please let me know if they help you or you still have some questions.
from sass-gradle-plugin.
Very cool, will do! Thanks!
from sass-gradle-plugin.
Ok, I followed instructions as described in simple example.
All I did was to copy my sass files to CultivarteWebStore\src\main\sass
- all files under that folder are prefixed with an "_" and with an *.scss extension.
I then added:
id 'io.miret.etienne.sass' version '1.1.2'
to plugins {...
section
This is the output: when I run compileSass
from NetBeans:
cd C:\...\Development\NetBeansProjects\CultivarteWebStore; .\gradlew.bat --configure-on-demand -x check compileSass
Configuration on demand is an incubating feature.
> Task :downloadSass UP-TO-DATE
> Task :installSass
> Task :compileSass
BUILD SUCCESSFUL in 935ms
3 actionable tasks: 2 executed, 1 up-to-date
The only thing that appears to happen is that an empty sass
folder is created under CultivarteWebStore\build
, but nothing seems to compile. Expecting to see generated *.css files...
What do you think? Maybe the way I'm prefixing my file names?
from sass-gradle-plugin.
Ha, I just removed the "_" from one of my files, and its css output DID end up in the build/sass folder!
from sass-gradle-plugin.
By the way, I think this is the correct behavior.
All my scss files (_utils.scss, _variables.scss, _mixins.scss, _main.scss, _product.scss, etc) have an underscore prefix. I can then just have a file called layout.scss that imports all the individual scss files with the underscore prefix. This way, the compiler only sees the file named layout.scss and it works out perfectly.
Your plugin is pretty awesome, thanks a lot for all the help!
Best regards!
from sass-gradle-plugin.
You’re welcome!
from sass-gradle-plugin.
As a side note, when the plugin is run with the watch()
option; the IDE displays the progress bar running nonstop at the bottom taskbar. And it stays this way the whole entire time while eclipse is open.
Since the plugin left the gradle daemon running in the background; it makes sense that it indicates that the plugin continues working (albeit, in the background).
I've used mostly eclipse in the past, and a nonstop progress bar usually indicates that eclipse would get stuck during a validation for example, so I would have to shutdown eclipse in order to get it unstuck.
When it happens in NetBeans after running your plugin with the watch()
option, it's a bit unsettling because it appears that the IDE got stuck, just as eclipse did. I need the progress bar to visually indicate if an action is happening at any point and then have it stop after is done.
What I now do in order to counteract this behavior is to shut down NetBeans and then get back in. Since the gradle daemon continues running, my scss files continue to compile after getting saved, but without the progress bar running nonstop.
But, top notch plugin. Thanks again!
from sass-gradle-plugin.
Related Issues (20)
- No signature of method: compileSass() HOT 1
- Plugin can't locate the dart-sass executable when running as part of multi-stage docker build HOT 2
- Issue with war integration HOT 6
- Disable automatic copying of CSS files to WAR file HOT 4
- Handle arm64 architectures HOT 2
- Issue when running plugin in a multi-project build HOT 6
- Sass compile time is too long HOT 2
- Issue when using Gradle 7.5 with configuration cache
- Gradle 8.0-rc-1: Unable to expand TAR '....tar.gz' HOT 1
- sourceDir is not accessible when using Kotlin Script HOT 1
- Update default version from 1.23.7 to 1.24.2
- I'd love to be able to specify a single entry point independent of `sourceDir` HOT 3
- Use GitHub Actions
- Inaccessible enums with Kotlin DSL
- command not found running in docker container HOT 2
- Latest plugin is compiled with Java 13 class files HOT 1
- Setting version does not work HOT 1
- Old sass version still used after changing version in build.gradle
- Add example with full Gradle build setup 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 sass-gradle-plugin.