mem-fs-editor
mem-fs-editor can be used for performing file operations, such as move, delete, copy etc. It is possible to perform templating on the files using ejs. This allows copied files to be dynamically built up with conditionals, have parts of them replaced etc.
mem-fs-editor is used for example by the very popular scaffolding tool Yeoman. Using Yeoman, one can use existing generators for creating projects, or create new generators tailored to ones own needs. The popular JHipster platform, for example, uses Yeoman and thus mem-fs-editor.
Templates in ejs and mem-fs-editor are by default started with <%
and ended with %>
. A problem arose however, when opening and closing template tags did not match in binary files, which causes ejb to throw an exception. My addition to mem-fs-editor is to no longer perform template substitution in binary files.
The code is available at my GitHub account. It is written in modern ECMAScript.
Below is the icon of Yeoman, and part of the source code that was changed.