@financial-times/n-storylines

``` npm install @financial-times/n-storylines ```

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
@financial-times/n-storylines
Minified + gzip package size for @financial-times/n-storylines in KB

Readme

n-storylines

npm install @financial-times/n-storylines

Containing the client- and server-side JS, SASS, and handlebars templates needed to display the storylines component.

Run locally

  1. demos - currently unavailable (see issues)

make build run and visit localhost:8080/demos

  1. npm link to the stream app

Add to an app

Node

const nStorylines = require('@financial-times/n-storylines');
const apiPayload = await fetch('next-storylines-api-<REGION>.herokuapp.com/concepts/<Concept ID>').then(fetchres.json);
const data = nStorylines.decorate(apiPayload); // decorates the API data with extra presentational goodies

Handlebars

{{> n-storylines/templates/main data}} // where data is the decorated payload above

SASS

@import 'n-storylines/main'

Clientside JS

const nStorylines = require('@financial-times/n-storylines');
nStorylines.init();

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.