Skip to content

Commit

Permalink
Removed Shapeless as a dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
japgolly committed Jan 19, 2016
1 parent 1fc2385 commit 7f783e4
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 145 deletions.
2 changes: 0 additions & 2 deletions core/src/main/scala/scalacss/Style.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package scalacss

import scala.runtime.AbstractFunction1
import scalaz.Monoid
import shapeless._
import shapeless.ops.hlist.Reverse

/**
* A high-level style, that can describe a subject and its children in a variety of conditions.
Expand Down
2 changes: 0 additions & 2 deletions core/src/main/scala/scalacss/mutable/Register.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package scalacss.mutable

import scala.annotation.tailrec
import scalaz.syntax.equal._
import shapeless._
import shapeless.ops.hlist.Mapper
import scalacss._
import Register.{MacroName, ErrorHandler, NameGen}

Expand Down
2 changes: 0 additions & 2 deletions core/src/main/scala/scalacss/mutable/StyleSheet.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package scalacss.mutable

import shapeless.HList
import shapeless.ops.hlist.Mapper
import scalacss._
import DslBase.{DslCond, ToStyle}

Expand Down
276 changes: 143 additions & 133 deletions core/src/test/scala/scalacss/ValueTTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package scalacss

import scala.concurrent.duration._
import scala.language.reflectiveCalls
import shapeless.test.illTyped
import utest._
import ValueT._
import ValueT.Rules._
Expand Down Expand Up @@ -30,168 +29,179 @@ object ValueTTest extends TestSuite {
// }

'Len {
test[Len](inherit)
illTyped("test[Len](1)")
illTyped("test[Len](1.5)")
test[Len](len)
illTyped("test[Len](%%)")
illTyped("test[Len](Literal.Typed.thick)")
illTyped("test[Len](Literal.Typed.dashed)")
illTyped("test[Len](Color.black)")
illTyped("test[Len](Literal.Typed.auto)")
illTyped("test[Len](Literal.rtl)")
illTyped("test[Len](sec)")
illTyped("test[Len](ms)")
test[Len](inherit)
compileError("test[Len](1)")
compileError("test[Len](1.5)")
test[Len](len)
compileError("test[Len](%%)")
compileError("test[Len](Literal.Typed.thick)")
compileError("test[Len](Literal.Typed.dashed)")
compileError("test[Len](Color.black)")
compileError("test[Len](Literal.Typed.auto)")
compileError("test[Len](Literal.rtl)")
compileError("test[Len](sec)")
compileError("test[Len](ms)")
()
}

'Pct {
test[Pct](inherit)
illTyped("test[Pct](1)")
illTyped("test[Pct](1.5)")
illTyped("test[Pct](len)")
test[Pct](%%)
illTyped("test[Pct](Literal.Typed.thick)")
illTyped("test[Pct](Literal.Typed.dashed)")
illTyped("test[Pct](Color.black)")
illTyped("test[Pct](Literal.Typed.auto)")
illTyped("test[Pct](Literal.rtl)")
illTyped("test[Pct](sec)")
illTyped("test[Pct](ms)")
test[Pct](inherit)
compileError("test[Pct](1)")
compileError("test[Pct](1.5)")
compileError("test[Pct](len)")
test[Pct](%%)
compileError("test[Pct](Literal.Typed.thick)")
compileError("test[Pct](Literal.Typed.dashed)")
compileError("test[Pct](Color.black)")
compileError("test[Pct](Literal.Typed.auto)")
compileError("test[Pct](Literal.rtl)")
compileError("test[Pct](sec)")
compileError("test[Pct](ms)")
()
}

'Integer {
test[Integer](inherit)
test[Integer](1)
illTyped("test[Integer](1.5)")
illTyped("test[Integer](len)")
illTyped("test[Integer](%%)")
illTyped("test[Integer](Literal.Typed.thick)")
illTyped("test[Integer](Literal.Typed.dashed)")
illTyped("test[Integer](Color.black)")
illTyped("test[Integer](Literal.Typed.auto)")
illTyped("test[Integer](Literal.rtl)")
illTyped("test[Integer](sec)")
illTyped("test[Integer](ms)")
test[Integer](inherit)
test[Integer](1)
compileError("test[Integer](1.5)")
compileError("test[Integer](len)")
compileError("test[Integer](%%)")
compileError("test[Integer](Literal.Typed.thick)")
compileError("test[Integer](Literal.Typed.dashed)")
compileError("test[Integer](Color.black)")
compileError("test[Integer](Literal.Typed.auto)")
compileError("test[Integer](Literal.rtl)")
compileError("test[Integer](sec)")
compileError("test[Integer](ms)")
()
}

'Number {
test[Number](inherit)
test[Number](1)
test[Number](1.5)
illTyped("test[Number](len)")
illTyped("test[Number](%%)")
illTyped("test[Number](Literal.Typed.thick)")
illTyped("test[Number](Literal.Typed.dashed)")
illTyped("test[Number](Color.black)")
illTyped("test[Number](Literal.Typed.auto)")
illTyped("test[Number](Literal.rtl)")
illTyped("test[Number](sec)")
illTyped("test[Number](ms)")
test[Number](inherit)
test[Number](1)
test[Number](1.5)
compileError("test[Number](len)")
compileError("test[Number](%%)")
compileError("test[Number](Literal.Typed.thick)")
compileError("test[Number](Literal.Typed.dashed)")
compileError("test[Number](Color.black)")
compileError("test[Number](Literal.Typed.auto)")
compileError("test[Number](Literal.rtl)")
compileError("test[Number](sec)")
compileError("test[Number](ms)")
()
}

'LenPct {
test[LenPct](inherit)
illTyped("test[LenPct](1)")
illTyped("test[LenPct](1.5)")
test[LenPct](len)
test[LenPct](%%)
illTyped("test[LenPct](Literal.Typed.thick)")
illTyped("test[LenPct](Literal.Typed.dashed)")
illTyped("test[LenPct](Color.black)")
illTyped("test[LenPct](Literal.Typed.auto)")
illTyped("test[LenPct](Literal.rtl)")
illTyped("test[LenPct](sec)")
illTyped("test[LenPct](ms)")
test[LenPct](inherit)
compileError("test[LenPct](1)")
compileError("test[LenPct](1.5)")
test[LenPct](len)
test[LenPct](%%)
compileError("test[LenPct](Literal.Typed.thick)")
compileError("test[LenPct](Literal.Typed.dashed)")
compileError("test[LenPct](Color.black)")
compileError("test[LenPct](Literal.Typed.auto)")
compileError("test[LenPct](Literal.rtl)")
compileError("test[LenPct](sec)")
compileError("test[LenPct](ms)")
()
}

'LenPctAuto {
test[LenPctAuto](inherit)
illTyped("test[LenPctAuto](1)")
illTyped("test[LenPctAuto](1.5)")
test[LenPctAuto](len)
test[LenPctAuto](%%)
illTyped("test[LenPctAuto](Literal.Typed.thick)")
illTyped("test[LenPctAuto](Literal.Typed.dashed)")
illTyped("test[LenPctAuto](Color.black)")
test[LenPctAuto](Literal.Typed.auto)
illTyped("test[LenPctAuto](Literal.rtl)")
illTyped("test[LenPctAuto](sec)")
illTyped("test[LenPctAuto](ms)")
test[LenPctAuto](inherit)
compileError("test[LenPctAuto](1)")
compileError("test[LenPctAuto](1.5)")
test[LenPctAuto](len)
test[LenPctAuto](%%)
compileError("test[LenPctAuto](Literal.Typed.thick)")
compileError("test[LenPctAuto](Literal.Typed.dashed)")
compileError("test[LenPctAuto](Color.black)")
test[LenPctAuto](Literal.Typed.auto)
compileError("test[LenPctAuto](Literal.rtl)")
compileError("test[LenPctAuto](sec)")
compileError("test[LenPctAuto](ms)")
()
}

'LenPctNum {
test[LenPctNum](inherit)
test[LenPctNum](1)
test[LenPctNum](1.5)
test[LenPctNum](len)
test[LenPctNum](%%)
illTyped("test[LenPctNum](Literal.Typed.thick)")
illTyped("test[LenPctNum](Literal.Typed.dashed)")
illTyped("test[LenPctNum](Color.black)")
illTyped("test[LenPctNum](Literal.Typed.auto)")
illTyped("test[LenPctNum](Literal.rtl)")
illTyped("test[LenPctNum](sec)")
illTyped("test[LenPctNum](ms)")
test[LenPctNum](inherit)
test[LenPctNum](1)
test[LenPctNum](1.5)
test[LenPctNum](len)
test[LenPctNum](%%)
compileError("test[LenPctNum](Literal.Typed.thick)")
compileError("test[LenPctNum](Literal.Typed.dashed)")
compileError("test[LenPctNum](Color.black)")
compileError("test[LenPctNum](Literal.Typed.auto)")
compileError("test[LenPctNum](Literal.rtl)")
compileError("test[LenPctNum](sec)")
compileError("test[LenPctNum](ms)")
()
}

'BrWidth {
test[BrWidth](inherit)
illTyped("test[BrWidth](1)")
illTyped("test[BrWidth](1.5)")
test[BrWidth](len)
illTyped("test[BrWidth](%%)")
test[BrWidth](Literal.Typed.thick)
illTyped("test[BrWidth](Literal.Typed.dashed)")
illTyped("test[BrWidth](Color.black)")
illTyped("test[BrWidth](Literal.Typed.auto)")
illTyped("test[BrWidth](Literal.rtl)")
illTyped("test[BrWidth](sec)")
illTyped("test[BrWidth](ms)")
test[BrWidth](inherit)
compileError("test[BrWidth](1)")
compileError("test[BrWidth](1.5)")
test[BrWidth](len)
compileError("test[BrWidth](%%)")
test[BrWidth](Literal.Typed.thick)
compileError("test[BrWidth](Literal.Typed.dashed)")
compileError("test[BrWidth](Color.black)")
compileError("test[BrWidth](Literal.Typed.auto)")
compileError("test[BrWidth](Literal.rtl)")
compileError("test[BrWidth](sec)")
compileError("test[BrWidth](ms)")
()
}

'BrStyle {
test[BrStyle](inherit)
illTyped("test[BrStyle](1)")
illTyped("test[BrStyle](1.5)")
illTyped("test[BrStyle](len)")
illTyped("test[BrStyle](%%)")
illTyped("test[BrStyle](Literal.Typed.thick)")
test[BrStyle](Literal.Typed.dashed)
illTyped("test[BrStyle](Color.black)")
illTyped("test[BrStyle](Literal.Typed.auto)")
illTyped("test[BrStyle](Literal.rtl)")
illTyped("test[BrStyle](sec)")
illTyped("test[BrStyle](ms)")
test[BrStyle](inherit)
compileError("test[BrStyle](1)")
compileError("test[BrStyle](1.5)")
compileError("test[BrStyle](len)")
compileError("test[BrStyle](%%)")
compileError("test[BrStyle](Literal.Typed.thick)")
test[BrStyle](Literal.Typed.dashed)
compileError("test[BrStyle](Color.black)")
compileError("test[BrStyle](Literal.Typed.auto)")
compileError("test[BrStyle](Literal.rtl)")
compileError("test[BrStyle](sec)")
compileError("test[BrStyle](ms)")
()
}

'WidStyCol {
test[WidStyCol](inherit)
illTyped("test[WidStyCol](1)")
illTyped("test[WidStyCol](1.5)")
test[WidStyCol](len)
test[WidStyCol](%%)
test[WidStyCol](Literal.Typed.thick)
test[WidStyCol](Literal.Typed.dashed)
test[WidStyCol](Color.black)
illTyped("test[WidStyCol](Literal.Typed.auto)")
illTyped("test[WidStyCol](Literal.rtl)")
illTyped("test[WidStyCol](sec)")
illTyped("test[WidStyCol](ms)")
test[WidStyCol](inherit)
compileError("test[WidStyCol](1)")
compileError("test[WidStyCol](1.5)")
test[WidStyCol](len)
test[WidStyCol](%%)
test[WidStyCol](Literal.Typed.thick)
test[WidStyCol](Literal.Typed.dashed)
test[WidStyCol](Color.black)
compileError("test[WidStyCol](Literal.Typed.auto)")
compileError("test[WidStyCol](Literal.rtl)")
compileError("test[WidStyCol](sec)")
compileError("test[WidStyCol](ms)")
()
}

'Time {
test[Time](inherit)
illTyped("test[Time](1)")
illTyped("test[Time](1.5)")
illTyped("test[Time](len)")
illTyped("test[Time](%%)")
illTyped("test[Time](Literal.Typed.thick)")
illTyped("test[Time](Literal.Typed.dashed)")
illTyped("test[Time](Color.black)")
illTyped("test[Time](Literal.Typed.auto)")
illTyped("test[Time](Literal.rtl)")
test[Time](sec)
test[Time](ms)
test[Time](inherit)
compileError("test[Time](1)")
compileError("test[Time](1.5)")
compileError("test[Time](len)")
compileError("test[Time](%%)")
compileError("test[Time](Literal.Typed.thick)")
compileError("test[Time](Literal.Typed.dashed)")
compileError("test[Time](Color.black)")
compileError("test[Time](Literal.Typed.auto)")
compileError("test[Time](Literal.rtl)")
test[Time](sec)
test[Time](ms)
()
}

}
Expand Down
2 changes: 0 additions & 2 deletions core/src/test/scala/scalacss/mutable/RegisterTest.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package scalacss.mutable

import shapeless._
import shapeless.syntax.singleton._ // TODO It would be nice to avoid the need for this import at client site
import utest._
import scalacss._
import Attrs._
Expand Down
4 changes: 4 additions & 0 deletions doc/history/0.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@

* Fixed generated CSS when combining `unsafeChild` with nesting and psuedoclasses/media-queries.

* Removed `StyleC`. *(Why? See [#48](https://github.com/japgolly/scalacss/issues/48).)*

* Removed Shapeless as a dependency.

Big thanks to [@Starzu](https://github.com/Starzu) for his contributions to this release.
6 changes: 2 additions & 4 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ object ScalaCSS extends Build {
homepage := Some(url("https://github.com/japgolly/scalacss")),
licenses += ("Apache-2.0", url("http://opensource.org/licenses/Apache-2.0")),
scalaVersion := Scala211,
// Needs Shapeless for Scala 2.10
// crossScalaVersions := Seq("2.10.5", Scala211),
scalacOptions ++= Seq("-deprecation", "-unchecked", "-feature",
"-language:postfixOps", "-language:implicitConversions",
Expand Down Expand Up @@ -53,7 +52,6 @@ object ScalaCSS extends Build {
val extra = m("extra")
val extScalaz72 = m("ext-scalaz72")
}
val shapeless = Library("com.chuusai", "shapeless", "2.2.5")


// ==============================================================================================
Expand All @@ -67,8 +65,8 @@ object ScalaCSS extends Build {
lazy val (core, coreJvm, coreJs) =
crossDialectProject("core", commonSettings
.configure(definesMacros, utestSettings()) //, Gen.attrAliases)
.addLibs(scalaz.core, shapeless, nyaya.test % Test)
.jj(_ => initialCommands := "import shapeless._, ops.hlist._, syntax.singleton._, scalacss._")
.addLibs(scalaz.core, nyaya.test % Test)
.jj(_ => initialCommands := "scalacss._")
)

lazy val (extScalatags, extScalatagsJvm, extScalatagsJs) =
Expand Down

0 comments on commit 7f783e4

Please sign in to comment.