pipe-ist aims to be good at a single part of the building process: Pipelines.
All configuration is done in a
pipefile used in this specification looks like the following:
// pipefile.jsvar pi = ;pi;
pipe-ist differs from other build systems in what it does not do. It does not:
It focusses on one part of the "build" process:
In the context of
pipe-ist a pipeline is a series of "processes" which a file is passed through. We call each individual process a Pipe. Pipes have the opportunity to transform a file in whatever manner they like, and these changes will be reflected throughout the rest of the pipeline.
Take the example file structure:
- src/- main.ts- index.html- img/- your_face.png
In order to instantiate the task "default" we run the command
piper default (it could just be
piper, but we are being specific here!). This runs the task with the name "default", which is in this case our only task. It is here the "magic" begins.
Firstly, all of our files are passed through
compile-typescript-pipe which yields the new file structure:
- src/- main.js- index.html- img/- your_face.png
note: The file structure is copied into memory, so nothing is persisted until the pipeline has finished running. This means that your
main.ts file WILL NOT be replaced with a compiled
main.js on your actual file system!
Each Pipe defines a function which will dynamically tell the pipeline runner whether or not it is fit to process a file. In this case,
main.ts was eligible so was thus processed, however
index.html were not.
Next the files are passed through
move-to-bin-pipe. This results in:
- src/- dist/- main.js- index.html- img/- your_face.png
Finally, because this is the last Pipe the virtual copies of the files are persisted into the file system. Which means that the end result for the physical file system would be:
- src/- main.ts- index.html- img/- your_face.png- dist/- main.js- index.html- img/- your_face.png