Coder Social home page Coder Social logo

Comments (11)

EtienneMiret avatar EtienneMiret commented on August 24, 2024

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.

ingeniotechnologies avatar ingeniotechnologies commented on August 24, 2024

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.

EtienneMiret avatar EtienneMiret commented on August 24, 2024

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.

ingeniotechnologies avatar ingeniotechnologies commented on August 24, 2024

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.

EtienneMiret avatar EtienneMiret commented on August 24, 2024

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.

ingeniotechnologies avatar ingeniotechnologies commented on August 24, 2024

Very cool, will do! Thanks!

from sass-gradle-plugin.

ingeniotechnologies avatar ingeniotechnologies commented on August 24, 2024

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.

ingeniotechnologies avatar ingeniotechnologies commented on August 24, 2024

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.

ingeniotechnologies avatar ingeniotechnologies commented on August 24, 2024

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.

EtienneMiret avatar EtienneMiret commented on August 24, 2024

You’re welcome!

from sass-gradle-plugin.

ingeniotechnologies avatar ingeniotechnologies commented on August 24, 2024

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)

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.