exhibit-core

0.6.1 • Public • Published

exhibit-core

NPM version Build Status Dependency Status

This is the engine at the core of Exhibit.js.

The main exhibit module is essentially a wrapper around this engine, adding things that make it more user friendly: watch-triggered batches, logging events, writing out changes to a destination directory, default importers, server and BrowserSync integration etc.

The engine itself is just a manually operated functional system for processing incremental batches of changes to a set of files. It remembers state so it can process subsequent batches quicker. You configure it with builders (without which it would just output whatever you put in) and importers (which are made available to builders for importing external files).

Usage

import Engine from 'exhibit-core';
 
const engine = new Engine({builders, importers});
 
engine.batch(files, changedExternalPaths).then(results => {
  // e.g. save results to disk
 
}).catch(err => console.error(err));
 
// (then do further, incremental .batch() calls, passing only changed source files)

Options

  • builders - array of builder functions
  • importers - array of importer functions

Readme

Keywords

none

Package Sidebar

Install

npm i exhibit-core

Weekly Downloads

1

Version

0.6.1

License

MIT

Last publish

Collaborators

  • callumlocke