Skip to content

Commit

Permalink
removed unused imports.
Browse files Browse the repository at this point in the history
increased version number 0.105
added sort extension method for JavaScript environments so that JVM and Native won't suffer from an unused import.
Removed old doc theme and template.
  • Loading branch information
c committed Dec 4, 2023
1 parent 6466181 commit bd28ff3
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 40 deletions.
34 changes: 27 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import laika.config.SyntaxHighlighting
import laika.format.Markdown
import laika.helium.Helium
import laika.helium.config.{HeliumIcon, IconLink}

val appVersion:String = "0.105"
val globalScalaVersion = "3.3.1"

Expand All @@ -22,13 +27,28 @@ lazy val narr = crossProject(JSPlatform, JVMPlatform, NativePlatform)

lazy val root = tlCrossRootProject.aggregate(narr, tests).settings(name := "narr")

lazy val docs = project.in(file("site")).enablePlugins(TypelevelSitePlugin).settings(
mdocVariables := Map(
"VERSION" -> appVersion,
"SCALA_VERSION" -> globalScalaVersion
),
laikaConfig ~= { _.withRawContent }
)
lazy val docs = project
.in(file("site"))
.dependsOn(narr.jvm)
.settings(
laikaExtensions := Seq(Markdown.GitHubFlavor, SyntaxHighlighting),
laikaConfig ~= { _.withRawContent },
tlSiteHelium := {
Helium.defaults.site.metadata(
title = Some("S"),
language = Some("en"),
description = Some("S"),
authors = Seq("one"),
)
.site
.topNavigationBar(
homeLink = IconLink.internal(laika.ast.Path(List("index.md")), HeliumIcon.home),
navLinks = Seq(IconLink.external("https://github.com/dragonfly-ai/narr", HeliumIcon.github))
)
}
)
.enablePlugins(TypelevelSitePlugin)
.enablePlugins(NoPublishPlugin)

lazy val unidocs = project
.in(file("unidocs"))
Expand Down
31 changes: 0 additions & 31 deletions docs/default.template.html

This file was deleted.

5 changes: 4 additions & 1 deletion narr/js/src/main/scala/narr/native/Extensions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ object Extensions {
// }
}

extension[T <: AnyRef | Boolean | Char | Long | Unit] (a:NArray[T]) {
def sort(ord: Ordering[T]): NArray[T] = a.asInstanceOf[SortableNArr[T]].sort(ord).asInstanceOf[NArray[T]]
}

extension[T] (a:NArray[T]) {
inline def copy: NArray[T] = {
var temp = a.asInstanceOf[NArr[T]]
Expand Down Expand Up @@ -366,7 +370,6 @@ object Extensions {
*/
def splitAt(n: Int): (NArray[T], NArray[T]) = (take(n), drop(n))


/** Sorts this array according to a comparison function.
*
* The sort is stable. That is, elements that are equal (as determined by
Expand Down
1 change: 0 additions & 1 deletion tests/shared/src/test/scala/Sort.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

import narr.*
import Extensions.given

import scala.language.implicitConversions
import scala.util.Random as r
Expand Down

0 comments on commit bd28ff3

Please sign in to comment.