tb

tarragon-builder

Replacement of the System.Void type

Showing:

Popularity

Downloads/wk

1

GitHub Stars

53

Maintenance

Last Commit

2mos ago

Contributors

4

Package

Dependencies

7

Size (min+gzip)

0.2KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Tarragon Builder

Tarragon Builder is a is a script/library that does literally nothing. The rest of this readme is made up.

Installation

npm install tarragon-builder

Usage

The library exports a single function. This function takes the following arguments:

  1. operation - an object that contains the following:
  2. the filter that matches files to be transformed
  3. the target that describes where to save the transformed file
  4. the pipeline that describes the sequence of transformation steps
  5. previousHashes - a mapping of filename to md5 hash, allowing the function to avoid processing unchanged files

The Filter

The filter should be an array of strings to be passed into a globby search

The Target

The target is an EJS templated string with the following variables:

  1. dir - the dirname of the source file
  2. base - the basename of the source file
  3. ext - the extension of the source file (.xxx)

The Pipeline

The pipeline is simply an array of functions that return promises. The functions each take the path of the file to transform. In general each function is expected to read from the file, perform some arbitrary transformation and then write back to the same file. Note that at this point the file has already been moved to its target destination.

In order for tarragon-builder to work, it expects to be run in the target project directory root. It expects the presence of a build.js file. This file exports the config that tarragon builder reads. An example config looks like this:

As a Daemon

This library can also be run as a daemon if installed globally. In order to use this daemon, it expects to find a build.js file in the project root, that exports an array of operation objects. Simply run: tarragon-build to kick the daemon off.

It should first do an entire rebuild as it discovers all the files for the first time, followed by then only transforming files if and when they change.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100