SBT plugin that allows to import parts of a WebJar into your project
Add this plugin to your project in project/plugins.sbt
:
addSbtPlugin("com.commercetools.sunrise" % "sbt-commercetools-sunrise-theme-importer" % "0.2.0")
Then enable it in your root project's settings:
val root = (project in file("."))
.enablePlugins(SunriseThemeImporterPlugin)
sunriseThemeJarName in Compile
: Name of the webjar dependency containing the Sunrise Theme (default "commercetools-sunrise-theme")
Once the plugin has been enabled, you will be able to access the following commands in SBT.
Import all Theme's files into the project to enable editing:
> sunriseThemeImportAll
For templates and i18n files, the destination is the project's resource folder. For the rest, the files go into public/
folder after Play Framework's structure.
Import the given template files into the project's resource folder to enable editing:
E.g.:
> sunriseThemeImportTemplateFiles common/logo.hbs cart.hbs
Import the given i18n files into the project's resource folder to enable editing:
E.g.:
> sunriseThemeImportI18nFiles en/home.yaml de/home.yaml