Git Product home page Git Product logo

Comments (11)

plexus avatar plexus commented on July 30, 2024

Has anyone tried this already? It might "just work", if the SASS is compiled before packing up the uberjar. If not that's something that needs looking into, as Heroku support is a key feature for Chestnut.

from chestnut.

rukor avatar rukor commented on July 30, 2024

I've only tried locally, can give it a go with heroku now.

from chestnut.

rukor avatar rukor commented on July 30, 2024

First the default org.clojars.aew/lein-sassc 0.10.0 does not exist on clojars, so it doesnt resolve. I changed it to lein-sassc and that resolves, but it doesnt build. says

โžœ chestnut git:(master) โœ— lein uberjar
Deleting files generated by lein-sassc.
Deleting files generated by lein-cljsbuild.
Compiling chestnut.dev
Compiling chestnut.server
java.lang.IllegalAccessError: start-sass does not exist, compiling:(server.clj:1:1)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3558)
at clojure.lang.Compiler.compile1(Compiler.java:7226)
at clojure.lang.Compiler.compile1(Compiler.java:7216)
at clojure.lang.Compiler.compile(Compiler.java:7292)
at clojure.lang.RT.compile(RT.java:398)

from chestnut.

bzalasky avatar bzalasky commented on July 30, 2024

Would it make sense to use JRuby to compile Sass in a Chestnut project? I was actually going to start working on this a few weeks ago, but got sidetracked.

from chestnut.

rukor avatar rukor commented on July 30, 2024

Something along the lines of this? https://github.com/darrinholst/sass-java I think that might be the way to go as embedding binaries or dynamically fetching them might not be so clean IMHO

from chestnut.

rukor avatar rukor commented on July 30, 2024

Vaadin does seem to have implemented a compiler in java https://vaadin.com/book/-/page/themes.sass.html. Might actually be an easier route

From that page:
...
java -cp '../../../WEB-INF/lib/*' com.vaadin.sass.SassCompiler styles.scss styles.css
...

from chestnut.

bzalasky avatar bzalasky commented on July 30, 2024

The only concern I have with an alternative compiler is that the primary Sass compiler is written in Ruby. Most people that are working on projects with Sass will be pulling in external mixin libraries like Compass or Bourbon. In this case, I'm not familiar with sass-java or Vaadin and whether incompatibility with the mixin libraries I mentioned could creep in over time (if the alternative compilers don't keep pace with the main project).

from chestnut.

plexus avatar plexus commented on July 30, 2024

It seems the current SASS support isn't mature enough yet for a stable release. I will drop SASS support before releasing 0.7.0, we can figure out what to do with it for 0.8.0.

from chestnut.

megamaddu avatar megamaddu commented on July 30, 2024

I didn't have any problems with sassc specifically, but when I was trying to use it along with http-kit I would randomly have unexplainable exceptions trying to call (run). Sometimes doing a complete clean would fix it: lein do clean, cljsbuild clean, sassc clean, sassc once, cljsbuild once, repl -> (run). But sometimes it wouldn't. I ended up going back to the default settings until it's more stable.

from chestnut.

plexus avatar plexus commented on July 30, 2024

I finally managed to have a proper look at this. It seems the only way to install sassc on any platform is from source, this is simply not something we can burden the average chestnut user with.

Sticking to the canonical Ruby implementation is an attractive choice, and it seems somebody already did the hard work: https://github.com/mylesmegyesi/sass-clojure

Unfortunately it's only a lib, no leiningen hooks available as far as I can tell.

from chestnut.

plexus avatar plexus commented on July 30, 2024

Closing in favor of #70

from chestnut.

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.