Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sake92/hepek-core

The core of hepek project
https://github.com/sake92/hepek-core

dependency-analysis dependency-graph hepek java scala static-site-generator

Last synced: 23 days ago
JSON representation

The core of hepek project

Awesome Lists containing this project

README

        

# hepek-core
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/ba.sake/hepek-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/ba.sake/hepek-core)

## Usage
- Add to deps:
```scala
libraryDependencies ++= Seq(
"ba.sake" % "hepek-core" % "0.2.0"
)
```

# What is it?
Core of the [sbt-hepek](https://github.com/sake92/sbt-hepek).
This project contains two interfaces ([`Renderable`](https://github.com/sake92/hepek-core/blob/master/src/main/java/ba/sake/hepek/core/Renderable.java)
and [`RelativePath`](https://github.com/sake92/hepek-core/blob/master/src/main/java/ba/sake/hepek/core/RelativePath.java))
and a single helper class ([`ClassycleDependencyUtils`](https://github.com/sake92/hepek-core/blob/master/src/main/java/ba/sake/hepek/core/ClassycleDependencyUtils.java)).

Interfaces are **essential** to the sbt-hepek:
- All objects that are meant to be rendered must extend `Renderable`
- `RelativePath` is used for getting a relative path to a `Renderable` or another file (css, js or whatever)

The `ClassycleDependencyUtils` class has one handy method called `reverseDependencies` that returns `Map[AtomicVertex, Set[AtomicVertex]]`.
Vertices here are actually Java bytecode classes.

It is used for optimized rendering of objects.
When an object is *changed and compiled*, this method determines **which other objects use it**, so that they are rendered again too.

Special thanks to [Classycle](http://classycle.sourceforge.net/)! :)