---
author: Jonathan Soeder
type: testcase
---

# Skypager.js

Welcome to the documentation and test suite for Skypager which I
like to call the cloud writing framework.  Skypager makes it easy to
build data driven reactive websites on top of the many forms of constantly
evolving streams of communication that humans engage in on the internet.

A Skypager project contains writing about certain abstract set of Things, or more formally Entities.  These entities usually exist in or are referred to by some other document, system, or external API.  A lot of the time these Entities may change over time.  

Skypager provides an easy way for building functionality around these entities and their relationships to each other, and to incorporate other knowledge data related to these Entities in that exist in other systems.

## Setup

If you are reading this page, this has been generated by Skypager.  It
consists of individual markdown files that correspond to important areas
of the project's internals.  These markdown files follow a particular
structure with respect to the headings they use. This allows us to parse
their contents and use them to build more dynamic and interactive web
content than we would be able to with just traditional markdown. 

This documentation is both API documentation for the project and runnable test code.

## Specifications

### Skypager Projects can be required like any common.js document 

```javascript
project.should.have.property('uri')
project.should.have.property('dirname', 'documentation')
```

### Skypager reads a collection of files and turns them into javascript 

Skypager projects have a special structure.  Different folders are used to store different types of files which serve a different purpose. 

#### Assets

We start with the project assets themselves which would be anything from markdown documents, static data sources in JSON, SVG Diagrams, excel spreadsheets: anything which can be read and parsed and turned into javascript data. 

```javascript
project.paths.should.have.property('assets')
project.paths.should.have.property('documents')
project.paths.should.have.property('data_sources')
```

These assets are available to the project as content which can be
directly rendered on a website, in the most simplest case.  

```javascript
project.content.documents.should.have.property('assets')
project.content.assets.should.have.property('assets')
project.content.data_sources.should.have.property('assets')
```

However it is when we parse these things and use them to power our entity models, that we can do really interesting things with them.  The helper system allows us to define the way this content can be used to power these kinds of applications. 

#### Helpers

Helpers are different types of javascript files which an be used to
extend the functionality of a Skypager Project, control how it is
rendered, how it can observe or interact with the outside world to keep
the different Entities referred to in the project in sync. 

A project can include its own custom helpers directly.

```javascript
project.paths.should.have.property('actions')
project.paths.should.have.property('exporters')
project.paths.should.have.property('importers')
project.paths.should.have.property('models')
project.paths.should.have.property('plugins')
project.paths.should.have.property('renderers')
```
### Skypager ships with a few of its own helpers

Skypager also ships with a bunch of its own helpers for common use cases.

Using helpers internally is a clean way of organizing the many different
parts of our code base.

```javascript
skypager.helpers.exporters.assets.should.not.have.property('length',0)
skypager.helpers.importers.assets.should.not.have.property('length',0)
skypager.helpers.models.assets.should.not.have.property('length',0)
skypager.helpers.renderers.assets.should.not.have.property('length',0)
```

### Skypager ships with a few of its own plugins.

```javascript
skypager.helpers.plugins.should.have.property('assets')
skypager.helpers.plugins.assets.should.not.have.property('length',0)
```

These can be used by any project, and provide additional helpers.


