build.sc
changeset 33 53da843ccd58
parent 32 7cc486dc94cd
child 34 2b907c14fdcb
equal deleted inserted replaced
32:7cc486dc94cd 33:53da843ccd58
       
     1 /*
       
     2  * REPL:
       
     3  *
       
     4  * ./mill -i -w
       
     5  *
       
     6  * Generate Idea project:
       
     7  *
       
     8  * ./mill mill.scalalib.GenIdea/idea
       
     9  *
       
    10  */ 
     1 import ammonite.ops._
    11 import ammonite.ops._
     2 import mill._
    12 import mill._
     3 import mill.api.Loose
    13 import mill.api.Loose
     4 import mill.define.{Input, Sources, Target}
    14 import mill.define.{Input, Sources, Target}
     5 import mill.scalajslib._
    15 import mill.scalajslib._
    35 
    45 
    36   override def artifactName = "fatags"
    46   override def artifactName = "fatags"
    37 
    47 
    38   def publishVersion: Target[String] = V.fatags
    48   def publishVersion: Target[String] = V.fatags
    39 
    49 
    40   def pomSettings = PomSettings(
    50   def pomSettings: T[PomSettings] = PomSettings(
    41     description = "FontAwesome Scala DSL (tags)",
    51     description = "FontAwesome Scala DSL (tags)",
    42     organization = "net.tz",
    52     organization = "net.tz",
    43     url = "https://hg.functionals.cz/fatags",
    53     url = "https://hg.functionals.cz/fatags",
    44     licenses = Seq(License.`Apache-2.0`),
    54     licenses = Seq(License.`Apache-2.0`),
    45     versionControl = VersionControl(developerConnection = Some(
    55     versionControl = VersionControl(developerConnection = Some(
    80 
    90 
    81   override def sources: Sources = T.sources{
    91   override def sources: Sources = T.sources{
    82     super.sources() :+ PathRef(millSourcePath / 'shared / 'src / 'main / 'scala)
    92     super.sources() :+ PathRef(millSourcePath / 'shared / 'src / 'main / 'scala)
    83   }
    93   }
    84 
    94 
    85   // https://github.com/FortAwesome/Font-Awesome/raw/5.11.2/metadata/icons.json
    95   // https://github.com/FortAwesome/Font-Awesome/raw/5.15.1/metadata/icons.json
    86   type IcoDef = (String, Set[String])
    96   type IcoDef = (String, Set[String])
    87   def parseIcons: Target[List[IcoDef]] = T{
    97   def parseIcons: Target[List[IcoDef]] = T{
    88     ujson.read(os.read! pwd / "icons.json").obj.map(e => (e._1, e._2.obj("styles").arr.map(_.str).toSet)).toList
    98     ujson.read(os.read! pwd / "icons.json").obj.map(e => (e._1, e._2.obj("styles").arr.map(_.str).toSet)).toList
    89   }
    99   }
    90 
   100