require-middleman-partial
v1.0.1
Published
Require a dir of files and write the results back to the fs as [Middleman](https://middlemanapp.com/) [partial](https://middlemanapp.com/basics/partials/) files.
Downloads
10
Readme
require-middleman-partial
Require a dir of files and write the results back to the fs as Middleman partial files.
A dir with following layout :
./scan
| -- index.md.js
| -- resources
` -- fox.md.js
will result in
./target
| -- _index.md.js.erb
| -- resources
` -- _fox.md.js.erb
Installation
npm install require-middleman-partial --save-dev
Command line Usage
./node_modules/bin/require-middleman-partial.js <scan dir> <scan extension> <target dir> <target extension>
An example :
./node_modules/bin/require-middleman-partial.js ./scan/includes .md.js ./target .md
Library Usage
const requireMiddlemanPartial = require('require-middleman-partial');
requireMiddlemanPartial.generateFiles('./scan/includes', '.md.js', './target', '.md');