All Projects → sake92 → sbt-hepek

sake92 / sbt-hepek

Licence: Apache-2.0 License
Sbt plugin for rendering Scala objects to files. And more!

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to sbt-hepek

sbt-travisci
An sbt plugin to integrate with Travis CI
Stars: ✭ 44 (+158.82%)
Mutual labels:  sbt, sbt-plugin
xsbt-webstart
A Webstart plugin for sbt
Stars: ✭ 12 (-29.41%)
Mutual labels:  sbt, sbt-plugin
sbt-project-switcher
A sbt plugin to switch project in a snappy way⚡️
Stars: ✭ 36 (+111.76%)
Mutual labels:  sbt, sbt-plugin
gatling-sbt-plugin
Gatling Plugin for SBT
Stars: ✭ 105 (+517.65%)
Mutual labels:  sbt, sbt-plugin
sbt-example
Run Scaladoc as unit tests
Stars: ✭ 30 (+76.47%)
Mutual labels:  sbt, sbt-plugin
sbt-swagger-2
sbt plugin for generating Swagger JSON schemas during build
Stars: ✭ 13 (-23.53%)
Mutual labels:  sbt, sbt-plugin
sbt-ecr
An SBT plugin for managing Docker images within Amazon ECR.
Stars: ✭ 52 (+205.88%)
Mutual labels:  sbt, sbt-plugin
sbt-sonar
An sbt plugin which provides an easy way to integrate Scala projects with SonarQube.
Stars: ✭ 62 (+264.71%)
Mutual labels:  sbt, sbt-plugin
sbt-jni
SBT Plugin to ease working with JNI
Stars: ✭ 110 (+547.06%)
Mutual labels:  sbt, sbt-plugin
sbt-flaky
Detect flaky tests with sbt
Stars: ✭ 35 (+105.88%)
Mutual labels:  sbt, sbt-plugin
sbt-findbugs
FindBugs static analysis plugin for sbt.
Stars: ✭ 47 (+176.47%)
Mutual labels:  sbt, sbt-plugin
sbt-elm
Scala Build Tool (SBT) plugin for the Elm programming language
Stars: ✭ 44 (+158.82%)
Mutual labels:  sbt, sbt-plugin
sbt-graphql
SBT plugin to generate and validate graphql schemas written with Sangria
Stars: ✭ 94 (+452.94%)
Mutual labels:  sbt, sbt-plugin
sbt-rewarn
Make sbt always display compilation warnings, even for unchanged files.
Stars: ✭ 42 (+147.06%)
Mutual labels:  sbt, sbt-plugin
sbt-sass
A fork of the sbt-sass repository which seems to be abandoned.
Stars: ✭ 32 (+88.24%)
Mutual labels:  sbt, sbt-plugin
sbt-bazel
Easily convert SBT projects to Bazel workspaces
Stars: ✭ 55 (+223.53%)
Mutual labels:  sbt, sbt-plugin
sbt-ghpages
git, site and ghpages support for sbt projects.
Stars: ✭ 94 (+452.94%)
Mutual labels:  sbt, sbt-plugin
sbt-babel
An SBT plugin to perform Babel compilation.
Stars: ✭ 12 (-29.41%)
Mutual labels:  sbt, sbt-plugin
chuckwagon
a Scala/sbt AWS Lambda Toolkit
Stars: ✭ 29 (+70.59%)
Mutual labels:  sbt, sbt-plugin
sbt-kubeyml
Sbt plugin to help deploy Scala applications to Kubernetes
Stars: ✭ 37 (+117.65%)
Mutual labels:  sbt, sbt-plugin

sbt-hepek

Maven Central

Welcome to sbt-hepek, an sbt plugin for rendering Scala objects to files.
See also hepek, static content generator that builds upon this plugin.

Examples

Installing

Make sure you are using sbt 1.x! Adding following line to the project/plugins.sbt file, in your project:

addSbtPlugin("ba.sake" % "sbt-hepek" % "0.2.1")

and enable it in your build.sbt:

enablePlugins(HepekPlugin)
// logLevel in hepek := Level.Debug // enable to see which objects are rendered

Using

Main task of sbt-hepek is called hepek.
When executed, it will render all Scala objects that extend Renderable trait to respective files, relative to the hepekTarget folder.

Example:

import java.nio.file.Paths
import ba.sake.hepek.core.Renderable

object RenderMe extends Renderable {

  override def render =
    "Some text..." // arbitrary Scala code
  
  override def relPath = 
    Paths.get("renderme.txt")
}

Default value for hepekTarget is hepekTarget := target.value / "web" / "public" / "main".
The good old target folder.
When you run sbt hepek task, you'll find the renderme.txt file in the target/web/public/main folder with contents you specified by the render method.


About the name

A "hepek" in Bosnian language is a jargon for a thing/thingy/stuff...
It is used when we don't know the name of a thing: "Give me that ... hepek".
Also, it is used in the famous show called "Top lista nadrealista" as a name for an advanced device which calms down situations of various kinds.

IMAGE ALT TEXT HERE

Fun fact

I think that this is the first project that tried this approach, namely, using first-class Scala objects for this kind of stuff.
Correct me if I'm wrong... ^_^

Contact

Author of the plugin is Sakib Hadžiavdić.
Twitter: @sake_92
Email: [email protected]

License

This code is open source software licensed under the Apache 2.0 License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].