Skip to content
This repository has been archived by the owner on Jan 16, 2019. It is now read-only.

Commit

Permalink
ScalaCSSDemosPlugin styles fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Starzu committed Jul 28, 2016
1 parent 01d6680 commit e681d99
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import io.udash.generator.{FrontendOnlyProject, GeneratorPlugin, GeneratorSettin

object ScalaCSSDemosPlugin extends GeneratorPlugin with SBTProjectFiles with FrontendPaths with UtilPaths {

val stateName = "DemoStylesState"
override val dependencies = Seq(RPCDemosPlugin, CoreDemosPlugin)

override def run(settings: GeneratorSettings): GeneratorSettings = {
Expand All @@ -30,8 +31,8 @@ object ScalaCSSDemosPlugin extends GeneratorPlugin with SBTProjectFiles with Fro
frontendDir = settings.rootDirectory.subFile(frontend)
imagesDir = images(settings.rootDirectory.subFile(frontend))
}
val stateName = createDemoStyles(rootPck, settings)
addIndexLink(rootPck, stateName)
createDemoStyles(rootPck, settings)

createImages(imagesDir, settings)
prepareHtml(frontendDir, settings)
Expand Down Expand Up @@ -84,7 +85,7 @@ object ScalaCSSDemosPlugin extends GeneratorPlugin with SBTProjectFiles with Fro
})
}

private def createDemoStyles(rootPackage: File, settings: GeneratorSettings): String = {
private def createDemoStyles(rootPackage: File, settings: GeneratorSettings): Unit = {
val globalStylesScala = stylesPackageInSrc(rootPackage).subFile("GlobalStyles.scala")
val demoStylesScala = stylesPackageInSrc(rootPackage).subFile("DemoStyles.scala")

Expand Down Expand Up @@ -122,8 +123,6 @@ object ScalaCSSDemosPlugin extends GeneratorPlugin with SBTProjectFiles with Fro
val headerScala = componentsPackage.subFile("Header.scala")
val footerScala = componentsPackage.subFile("Footer.scala")

val stateName = "DemoStylesState"

createDirs(Seq(stylesPackageInSrc(rootPackage), configPackage, componentsPackage, stylesConstantsPackage, stylesFontsPackage, stylesPartialsPackage, stylesUtilsPackage))
createFiles(Seq(globalStylesScala, demoStylesScala, demoStylesViewScala, configScala, imageFactoryScala, headerScala, footerScala, stylesConstantsScala, stylesFontsScala, stylesHeaderScala, stylesFooterScala, stylesMediaQueriesScala, stylesStyleUtilsScala), requireNotExists = true)
requireFilesExist(Seq(dependenciesScala(settings), initScala, statesScala, routingRegistryDefScala, statesToViewPresenterDefScala, bindingDemoViewScala, indexViewScala, rootViewScala))
Expand Down Expand Up @@ -1308,8 +1307,5 @@ object ScalaCSSDemosPlugin extends GeneratorPlugin with SBTProjectFiles with Fro
|
|object Image extends ImageFactory("assets/images")
|""".stripMargin)


stateName
}
}

0 comments on commit e681d99

Please sign in to comment.