irundaia / sbt-sassify Goto Github PK
View Code? Open in Web Editor NEWsbt-web plugin for Sass files
License: Apache License 2.0
sbt-web plugin for Sass files
License: Apache License 2.0
We are currently trying to update our project to Play 2.8.x and Scala 2.13. We have this plugin included in our project according to the Play documentation.
Currently the Plugin is not available for Scala 2.13 which blocks our upgrade. Are there any plans or maybe an eta on when the plugin will be available for Scala 2.13
Currently the sassify source dir is defined with:
Assets / sassify := Def.task {
val sourceDir = (Assets / sourceDirectory).value
val targetDir = (Assets / sassify / resourceManaged).value
(...)
}
If I need to change the source dir for sassify I'm forced to change the sourceDirectory
for all the sbt-web assets. This could be easily changed with:
val sourceDir = (Assets / sassify / sourceDirectory).value
Since Assets / sassify / sourceDirectory
is not explicitly set sbt will search the "parent" Assets / sourceDirectory
, thus producing the same behavior as the current code. However if the user sets Assets / sassify / sourceDirectory
then the source directory will change just for sassify.
I want to have my .scss alongside with my .scala sources. This is especially helpful on frontend projects.
Is the filtering of the source maps (files and the mappings)still needed? I don't think it should be, now that jsass is no longer used. See also commit 174a366. Removing this code would simplify the plugin a lot.
It possible to exchange with prefixes during compilation? ex. sbt-autoprefixer
When I try to compile the following (s)scc:
input[type=url] {
padding-left: 2rem;
}
the plugin fails with this error message:
Error: Invalid CSS after "i": expected 1 selector or at-rule, was "input[type=url] {"
With the command line sass
version 3.5.2 there is no problem.
It seems that the problem is caused by the unquoted url
.
input[type=email]
, 'input[type=fooooo]and
input[type="url"]` compile without problems.
System: Ubuntu 16.04, 64bit
I'm seeing a JNA library loading issue on my MacBookAir with Apple Silicon (M1) + Big Sur.
Here is my full setup:
/opt/homebrew/Cellar/openjdk@11/11.0.9/libexec/openjdk.jdk/Contents/Home
)Here's the full stack trace when running last sassify
[info] Sass compiling on 24 source(s)
[error] java.lang.UnsatisfiedLinkError: /Users/benjamin/Library/Caches/JNA/temp/jna17537362502519181591.tmp: dlopen(/Users/benjamin/Library/Caches/JNA/temp/jna17537362502519181591.tmp, 1): no suitable image found. Did find:
[error] /Users/benjamin/Library/Caches/JNA/temp/jna17537362502519181591.tmp: no matching architecture in universal wrapper
[error] /Users/benjamin/Library/Caches/JNA/temp/jna17537362502519181591.tmp: no matching architecture in universal wrapper
[error] at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
[error] at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
[error] at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
[error] at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
[error] at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2627)
[error] at java.base/java.lang.Runtime.load0(Runtime.java:768)
[error] at java.base/java.lang.System.load(System.java:1837)
[error] at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1018)
[error] at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:988)
[error] at com.sun.jna.Native.<clinit>(Native.java:195)
[error] at org.irundaia.sass.SassCompiler$.<init>(SassCompiler.scala:28)
[error] at org.irundaia.sass.SassCompiler$.<clinit>(SassCompiler.scala)
[error] at org.irundaia.sbt.sass.SbtSassify$.$anonfun$baseSbtSassifySettings$10(SbtSassify.scala:100)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:285)
[error] at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
[error] at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
[error] at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:285)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:278)
[error] at scala.collection.AbstractTraversable.map(Traversable.scala:108)
[error] at org.irundaia.sbt.sass.SbtSassify$.$anonfun$baseSbtSassifySettings$8(SbtSassify.scala:100)
[error] at com.typesafe.sbt.web.incremental.package$.syncIncremental(package.scala:228)
[error] at org.irundaia.sbt.sass.SbtSassify$.$anonfun$baseSbtSassifySettings$6(SbtSassify.scala:140)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] at java.base/java.lang.Thread.run(Thread.java:834)
Note: I'm seeing a similar issue with the directory-watcher used by play-file-watcher.
Other related issues:
Using the version 1.4.13 on alpine linux cause the java runtime to crash, with version 1.4.12 works fine. This is a minimal repository reproducing the bug: repository
Running docker-compose up
in the repository starts a docker container with openjdk:8-alpine that runs sbt assets
. This cause the jvm to fail with the following message:
[info] Loading settings for project workingdir-build from metals.sbt,plugins.sbt ...
[info] Loading project definition from /workingDir/project
[info] Loading settings for project root from build.sbt ...
[info] Set current project to Bug (in build file:/workingDir/)
[info] Sass compiling on 1 source(s)
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00000000000b71d6, pid=1, tid=0x00007f8509fa9b10
#
# JRE version: OpenJDK Runtime Environment (8.0_212-b04) (build 1.8.0_212-b04)
# Java VM: OpenJDK 64-Bit Server VM (25.212-b04 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 3.12.0
# Distribution: Custom build (Sat May 4 17:33:35 UTC 2019)
# Problematic frame:
# C 0x00000000000b71d6
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /workingDir/hs_err_pid1.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# https://icedtea.classpath.org/bugzilla
#
Here is the full error report file:
hs_err_pid1.log
Would it be possible to reload sass files whenever they have been changed and a http request is made to play when in interactive mode?
Similar to play sources recompiling on reloads.
First of all, I am not familiar with Play yet, so please bear with me if this seems like a beginner question.
Since we are working with Sass with Play, we have included this plugin in our project according to the Play and sbt-sassify documentation.
Please see our project built as below,
I tried using sbt-sassify 1.4.12 and 1.4.13 yesterday.
Af first, I ran sbt run
, but under public/stylesheets, the compiled CSS was not being generated.
I tried using sbt assets
as well, but it did not seem like the compiler was executing.
[info] Loading settings for project ui-build from plugins.sbt ...
[info] Loading project definition from /Users/xxxx/xxx/xx/project
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] Loading settings for project root from build.sbt ...
[info] Set current project to xx (in build file:/Users/xxxx/xxx/xx/)
[success] Total time: 1 s, completed
Today, I tried using sbt-sassify v1.5.0 instead, and when I ran sbt assets
, sass compiling seemed to start to run, but soon NoSuchMethodError was shown.
[info] Sass compiling on 1 source(s)
[error] java.lang.NoSuchMethodError: com.sun.jna.Native.load(Ljava/lang/String;Ljava/lang/Class;)Lcom/sun/jna/Library;
[error] at org.irundaia.sass.SassCompiler$.<init>(SassCompiler.scala:44)
[error] at org.irundaia.sass.SassCompiler$.<clinit>(SassCompiler.scala)
[error] at org.irundaia.sbt.sass.SbtSassify$.$anonfun$baseSbtSassifySettings$10(SbtSassify.scala:100)
[error] at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:238)
[error] at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
[error] at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
[error] at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:238)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:231)
[error] at scala.collection.AbstractTraversable.map(Traversable.scala:108)
[error] at org.irundaia.sbt.sass.SbtSassify$.$anonfun$baseSbtSassifySettings$8(SbtSassify.scala:100)
[error] at com.typesafe.sbt.web.incremental.package$.syncIncremental(package.scala:228)
[error] at org.irundaia.sbt.sass.SbtSassify$.$anonfun$baseSbtSassifySettings$6(SbtSassify.scala:140)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:281)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error] at sbt.Execute.work(Execute.scala:290)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:281)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (Web-assets / sassify) java.lang.NoSuchMethodError: com.sun.jna.Native.load(Ljava/lang/String;Ljava/lang/Class;)Lcom/sun/jna/Library;
I am assuming that I am missing something on the configuration.
I would really appreciate it if you could help me to see if I made an oversight here.
In my multimodule Play webapp, I put the following in modules/cadenza/app/assets/stylesheets/main3.scss
:
@import "lib/cadenza/redmond/jquery-ui.css";
@import "lib/cadenza/redmond/jquery.ui.theme.css";
@import "lib/cadenza/css/bootstrap.css";
@import "lib/cadenza/css/bootstrap-datepicker.css";
@import "lib/cadenza/dropzone.css";
I had to modify the @import
path recommended by the docs to account for the placement of the lib/
directory in a multimodule project. The following files were output:
./target/web/public/main/stylesheets/main3.css
./target/web/classes/main/META-INF/resources/webjars/cadenza/3.0.0/stylesheets/main3.css
./target/web/sass/main/stylesheets/main3.css
All of the generated files had the @import
statements intact, without any expansion.
I then put this line at the top:
@import "lib/compass-mixins/lib/compass";
... but I got:
Error: Functions may not be defined within control directives or other mixins.
on line 81 of modules/cadenza/target/web/web-modules/main/webjars/lib/compass-mixins/lib/compass/functions/_lists.scss
>> @function compact($vars...) {
--^
In /var/work/training/cadenza/modules/cadenza/target/web/web-modules/main/webjars/lib/compass-mixins/lib/compass/functions/_lists.scss:81
77 @return nth($list, 1);
78}
79
80@if not(function-exists(compact)) {
81 @function compact($vars...) {
82 $list: ();
83 @each $var in $vars {
84 @if $var {
85 $list: append($list, $var, comma);
I tried upgrading to "compass-mixins" % "1.0.2"
and that eliminated the error, but still the @import
statements were not expanded.
Libsass 3.3.5 has been released. Upgrading should partially fix #11.
We have a slightly different directory structure in our project.
Our assets directory resides under /app/uk.myorg.com/assets.
In our Sbt build file we have set SassKeys.assetRootURL := "/uk.myorg.com". When we build, no css files are generated and nothing is output in the target directory.
Generating source maps in a directory which is not the root asset directory seems to break the source map. Ex. given a directory structure as:
assets
|-- stylesheets
|-- |-- style.scss
The source map will refer to the source file relative to its parent (<base-url>/style.scss
). It has to be verified whether this causes issues on browsers.
That's it.
I think it would be good to document the actions needed to compile the native libraries.
Libsass v3.3.3 will catch up on the Ruby implementation of Sass (v3.4.20). Once it is released, we should upgrade to the new version.
See also this issue.
Hi,
Since Play 2.6.5, sbt-sassify
doesn't seem to work properly, causing a internal server error:
[info] Sass compiling on 1 source(s)
java.lang.NoSuchMethodError: com.typesafe.sbt.web.CompileProblems$.report(Lsbt/LoggerReporter;Lscala/collection/Seq;)V
at org.irundaia.sbt.sass.SbtSassify$$anonfun$7$$anonfun$9.apply(SbtSassify.scala:116)
at org.irundaia.sbt.sass.SbtSassify$$anonfun$7$$anonfun$9.apply(SbtSassify.scala:85)
at com.typesafe.sbt.web.incremental.package$.syncIncremental(package.scala:228)
at org.irundaia.sbt.sass.SbtSassify$$anonfun$7.apply(SbtSassify.scala:133)
at org.irundaia.sbt.sass.SbtSassify$$anonfun$7.apply(SbtSassify.scala:67)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
[error] (web-assets:sassify) java.lang.NoSuchMethodError: com.typesafe.sbt.web.CompileProblems$.report(Lsbt/LoggerReporter;Lscala/collection/Seq;)V
I'm using sbt-sassify
version 1.4.9
.
Please let me know if you need any more information. Thanks!
I get build errors when there are spaces in the absolute path of the project root.
Works: /home/user/workspace/projectroot
Does not work: /home/user/work space/projectroot
The error message looks similar to this:
[error] /home/user/work space/projectroot/app/assets/stylesheets/somestyles.scss:1: Error: Illegal character in path at index 15: /home/user/work space/projectroot/app/assets/stylesheets/somestyles.scss
Using sbt-sassify 1.4.11, SBT 1.1.0 and webjars fontawesome 4.7.0 there are issues with the compiled css. All the icons show up as triple question marks. This doesn't happen when you switch to SBT 0.13.16 and keep everything the same. I think it's escaping the icon codes incorrectly? I'll follow up with an example project within 24hrs.
Version 1.4.10 of sbt-sassify does not seem to work with Java 8:
(web/web-assets:sassify) java.lang.UnsupportedClassVersionError: org/irundaia/sass/jna/SassLibrary has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
We should upgrade to libsass 3.3.6. This really should fix #11.
Libsass 3.3.2 has been released already. Since this release enables the Sass 3.4 spec, it is desirable to upgrade.
An upgrade is pending on jsass' upgrade to it though. See also issue #13 there.
When using compression in sbt-less, the output-file will end with .min.css.
https://github.com/sbt/sbt-less/blob/1.1.2/src/main/resources/lessc.js#L49
It would be nice if sbt-sassify could do the same. However I see how this would break existing projects. Maybe it could be added as an option? I'm not sure if that would be the right thing.
Is it possible to import sass files from an absolute path?
At the moment I am using relative paths for imports all over the place. As a project grows this can get quite messy: @import '../../../../colors';
Is there a way to point directly to the root directory in /assets/stylesheets
?
Hi. I just tried to @import bootstrap into my main.scss but it failed with the error below.
Running sassc with the latest libsass works just fine, downgrading libsass to 3.4.9 as used by sassify will trigger the same bug again.
$ sassc bootstrap.scss
Error: 1 isn't a valid CSS value.
on line 90 of vendor/_rfs.scss
>> $rfs-static: #{$fs / $rfs-rem-value}rem#{$rfs-suffix};
---------------------^
I think it would be nice to also log the sass compilation duration along with the number of files created.
Actually it looks like that sbt-sassify tries to load a libsass installed via homebrew which will result in segfaults when libsass v3.4.4 will be installed:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000014c5a5656, pid=3532, tid=0x0000000000006f03
#
# JRE version: Java(TM) SE Runtime Environment (8.0_131-b11) (build 1.8.0_131-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [libsass.dylib+0xe2656] sass_option_get_include_path+0x10
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
Memory Mapping is:
Register to memory mapping:
RAX=0x0000000000000000 is an unknown value
RBX=0x0000700012ef0708 is pointing into the stack for thread: 0x00007fbd6c016000
RCX=0x00000005c00029a0 is an oop
java.lang.String
- klass: 'java/lang/String'
RDX=0x0000000000000000 is an unknown value
RSP=0x0000700012eefcf0 is pointing into the stack for thread: 0x00007fbd6c016000
RBP=0x0000700012eefcf0 is pointing into the stack for thread: 0x00007fbd6c016000
RSI=0x0000000119d531f3 is at entry_point+307 in (nmethod*)0x0000000119d52e50
RDI=0x00007fbd717848e0 is an unknown value
R8 =0x000000075ff3f828 is an oop
java.lang.StringCoding$StringEncoder
- klass: 'java/lang/StringCoding$StringEncoder'
R9 =0x000000010000001c is an unknown value
R10=0x0000700012eefc50 is pointing into the stack for thread: 0x00007fbd6c016000
R11=0x000000014c5a5646: sass_option_get_include_path+0 in /usr/local/lib/libsass.dylib at 0x000000014c4c3000
R12=0x0000000000000001 is an unknown value
R13=0x0000000000000001 is an unknown value
R14=0x00000001173ce654: ffi_call+0x3f4 in /private/var/folders/7l/71g7frnd4zv1q4pzspdwwd2c0000gn/T/jna--690384987/jna3674340442953001969.tmp at 0x00000001173c1000
R15=0x71d1e21ed6c20052 is an unknown value
Reverting to 3.4.3 or uninstalling it fixes the issue.
It took me a while to figure it out that it will use the libsass that is loaded via homebrew.
Well I think we should actually add something to the readme that either libasss
needs to be uninstalled or that the version should align with the tested versions.
Apparently, the libsass C-API includes the following function:
char** sass_context_get_included_files (struct Sass_Context* ctx);
Currently, we're getting the included files out of the source map. If we use the function above, we can probably drop the dependency on play-json
.
Currently, it is not possible to include web jars in your own sass files. Suppose that I'm using the font-awesome web jar and I want to add some new animations to it. I wouldn't want to pollute my HTML with additional css sheets, but I want to include just one file for all font-awesome features. Then, I'd write a Sass file like:
@import "lib/font-awesome/scss/font-awesome.scss"; // Web-jarred font-awesome file
.myAnimation {
transition: ...;
}
While this should be valid, the sbt-web sources directory does not include web-jarred Sass files. And hence it won't compile. (A possible solution would be to add a include directory to the Sass compilation context.)
When working with Play, using JDK17 on Apple Silicon M1, I get the below stack trace. The problem is solved when moving back to JDK11.
(sbt 1.6.2, Play 2.8.15)
[info] Sass compiling on 7 source(s)
[error] stack trace is suppressed; run last Web-assets / sassify for the full output
[error] (Web-assets / sassify) java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
[error] a.a.ActorSystemImpl - Internal server error, sending 500 response
akka.http.impl.util.One2OneBidiFlow$OutputTruncationException: Inner flow was completed without producing result elements for 1 outstanding elements
at akka.http.impl.util.One2OneBidiFlow$OutputTruncationException$.apply(One2OneBidiFlow.scala:22)
at akka.http.impl.util.One2OneBidiFlow$OutputTruncationException$.apply(One2OneBidiFlow.scala:22)
at akka.http.impl.util.One2OneBidiFlow$One2OneBidi$$anon$1$$anon$4.onUpstreamFinish(One2OneBidiFlow.scala:97)
at akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:524)
at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:390)
at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:650)
at akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:521)
at akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:625)
at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:800)
at akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:818)
Looks like we need to wait for sbt-web first sbt/sbt-web#141
http://www.scala-sbt.org/1.0/docs/sbt-1.0-Release-Notes.html#sbt+1.0.0-RC2
e.g.: pipelineStages := Seq(sassify, filter, digest, gzip)
So that filter
can filter out .scss files from the result.
when I tried version 1.4.10
on JDK 8, I encountered this error:
error 11:55:59:AM] trace: throwable: java.lang.UnsupportedClassVersionError: org/irundaia/sass/jna/SassLibrary has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Looks like the library was published with JDK 9?
There is a typo in the readme file in the options table.
https://github.com/irundaia/sbt-sassify#options
"assetsRootURL" should be "assetRootURL"
As of Oct 26, 2020, libsass is now deprecated :(
The official recommendation is to move to dart sass instead.
I'm not sure what this means for the sbt-sassify plugin but it seems like having the Dart Sass binary installed locally may become a pre-requisite in the future.
Hi
The documentation mentions for the example the compiled sass would be available at public/stylesheets/
It looks like in my Play 2.6.9 application the output goes to target/web/sass/main/stylesheets rather than the expected target/web/public/main/stylesheets. Is there a configuration option I'm missing?
Thanks!
I noticed this when using the materialize 0.97.5 web jar. When @extend
runs more than 1 level deep, everything dies in a core dump.
Inside the materialize _buttons.scss
there is a nested include:
.btn {
text-decoration:none;
color: $button-color-raised;
background-color: $button-color;
text-align: center;
letter-spacing: .5px;
@extend .z-depth-1;
transition: .2s ease-out;
cursor: pointer;
&:hover {
background-color: lighten($button-color, 5%);
@extend .z-depth-1-half;
}
}
.btn-large {
@extend .btn;
height: $button-height * 1.5;
line-height: 56px;
i {
font-size: $button-large-icon-font-size;
}
}
Commenting out @extend .btn
lets everything compile, and all is fine.
https://gist.github.com/rpiaggio/1e08ae305a14253da97b
In the Gist above, with expected output (produced by http://www.sassmeister.com/) line 19 shows correct UTF-8 character.
When running sbt-sassify
on Linux, this works correctly.
However, when running it on Windows, that line is output as .fa-linkedin:before{content:"?"}
with an actual question mark (HEX 3F) in the file.
I'm not sure this is a sbt-sassify
issue or an internal libsass
issue.
Thank you! (and thank you for sbt-sassify
)
Error:
[error] (kotonoha/web-assets:sassify) java.lang.UnsatisfiedLinkError: libstdc++.so.6: cannot open shared object file: No such file or directory
Currently, I'm only testing a trivial build setup. I think I should write more scripted tests:
Libsass 3.3.4 has been released. Might be good to update to it.
Latest release according to the list is 1.4.10.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.