mathias / boot-sassc

Sass compiler task for boot 2
Eclipse Public License 1.0
9 stars 8 forks source link

Can't use :load-path option #6

Open samflores opened 9 years ago

samflores commented 9 years ago

I'm trying to use the recently merged (b39d653e1bd98249e4c3f2e3c7a96d1c3fcc313e) load-path option like this:

$ boot sass --load-path "bower_components/bourbon/dist"
# or
$ boot sass -p "bower_components/bourbon/dist"

It seems this change wasn't pushed to Clojars yet, so I cloned the repo and installed the jar with boot build-jar.

After that, the new option is shown on boot sass --help, but I'm getting an IllegalArgumentException saying option :load-path must be of type str. The other arguments that accept strings (-o, -f, -t) are working well.

Is this really a bug? Any tips?

mathias commented 9 years ago

Howdy,

I just pushed a new version (0.1.2) that should fix this -- there was an argument missing to the args vector that tells Boot that the CLI option will have an argument. But that release has stopped compiling my example Sass project, so I'm not sure if it is my local setup that's broken, or the code doesn't work with sassc anymore. I'm going to keep working on getting this working again.

samflores commented 9 years ago

:tada: The :load-path option works like a charm in this version. Thanks :tada:

lambdam commented 9 years ago

Hello,

I'd like to put my .scss files in the src folder and not in the resources folder (since it is compiled). Thus the src/scss folder is not in the boot :resource-paths set.

I tried boot sass -p "src/scss", boot sass -p "src/scss" -f "main.scss". Even boot sass --load-path "$(pwd)/src/scss" but nothing happens.

When I move the scss folder into the resources folder, I can see the Compiling main.scss line.
Also all the .scss files are copied into the target folder, :confused:, which I don't want.

I use version 0.1.2.

Would it be the same issue ?

Thanks

samflores commented 9 years ago

The --load-path option is used to tell the sass compiler where the additional .scss can be found (@import). The main.scss must be in the boot source dirs.

Try "boot -s src/scss sass"

lambdam commented 9 years ago

Thanks. Works perfectly.

@mathias I feel confusing that the README.md refers to :resource-paths in https://github.com/mathias/boot-sassc#usage. Is putting .scss files in the resources folder the regular way to go ?

mathias commented 9 years ago

You're right, we probably don't want to put your sass folder in Resource paths anymore. I need to look at this again and grok how the files get used in intermediate steps. Boot will essentially move things into place to compile them and then move out the finished compiled CSS to the target dir -- at least, that's the plan.

mathias commented 9 years ago

I just went through this with the https://github.com/mathias/boot-sassc-example/ example project -- the sass source does not need to be in /resources, it just gets added to the resources-paths set. In https://github.com/mathias/boot-sassc-example the scss files actually live in /sass. Does this help?