1
0
Fork 0
mirror of https://github.com/Oreolek/raconteur.git synced 2024-05-17 00:08:16 +03:00
Go to file
2015-04-07 21:52:38 -03:00
devel Porting 2015-04-07 21:44:08 -03:00
template Porting 2015-04-07 21:44:08 -03:00
undularity Porting 2015-04-07 21:44:08 -03:00
undum@a34891314f submodule with correct branch 2015-04-07 16:21:03 -03:00
.gitignore Porting 2015-04-07 21:44:08 -03:00
.gitmodules Initial commit 2015-04-07 16:16:49 -03:00
init.js hacking 2015-04-07 17:49:35 -03:00
README.md Create README.md 2015-04-07 21:52:38 -03:00
undularity.sublime-project Initial commit 2015-04-07 16:17:21 -03:00

Undularity

Undularity is a wrapper library for Undum which provides a lot of commonly-used functionality inspired by common Twine extensions, such as replacer/inserter links. It also provides a new API for Undum, with a DSL-like syntax that is especially suitable to be used with CoffeeScript or ES6.

Undularity is still a work in progress.

Code example

Defining a situation in Undularity using ES6:

situation('undularity_example', {
  content: `
  This is an example situation using Undularity's API. It supports Markdown
  in text, and helper functions to add 
  ${a().class('segue').content('links').toSituation('another_situation')}
  more easily.
  `});

Or with CoffeeScript:

situation 'undularity_example',
  content: """
  This is an example of a situation using Undularity's API. It supports Markdown
  in text, and helper functions to add
  #{a().class('segue').content('links').toSituation('another_situation')}
  more easily.
  """
# The link will render as:
# <a class="segue" href="another_situation">links</a>