Comments (11)
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.
I've only tried locally, can give it a go with heroku now.
from chestnut.
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.
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.
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.
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.
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.
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.
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.
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.
Closing in favor of #70
from chestnut.
Related Issues (20)
- [Help] Tweaking the template to work with nodejs repl HOT 3
- Sass compiling doesn't work HOT 1
- om/om.next HOT 4
- Calling `(reset)` at the cljs-repl causes the system to be completely dropped HOT 2
- Trouble setting up HOT 2
- Figwheel version might need to be updated to latest HOT 7
- cider-cljs-lein-repl is obsolete (since 0.17); use โcider-default-cljs-replโ instead HOT 1
- [Version 0.16.0 (67651e9d)] index.html references inexistent .js file, figwheel version inconsistency HOT 11
- Error when starting the application HOT 3
- Heroku procfile out of date HOT 1
- java.io.FileNotFoundException: Could not locate my_app/server__init.class or my_app/server.clj on classpath HOT 3
- Unrecognized option: +bidi HOT 2
- REPL server launch timed out HOT 4
- Figwheel CIDER middleware doesn't seem to be working. HOT 2
- Unable to resolve var: cider.piggieback/wrap-cljs-repl in this context HOT 5
- Repl never prompts HOT 11
- (go) has to be called every time a route is changed. HOT 1
- (go) not working (on repeat) HOT 1
- Cannot use resources folder in cljs. HOT 3
- (go) does not work in an Emacs CIDER REPL
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 chestnut.