yoke
Preprocessor for simple file concatenation.
Yoke is a declarative way to concatenate files for Front-End development. Within a .yoke file, list the files you would like put together.
Install
npm install yoke
Example
Inside a bundle.js.yoke list the files you want concatenated together.
js/license.js
js/angular.js
js/persona.js
js/swipe.js
js/app.js
Yoke fetches the content of all those files (in parallel) and merges them together preserving the order.
CLI
The yoke command outputs a stream with the concatenated output.
yoke bundle.js.yoke
To save, simply pipe the output to a destination file.
yoke bundle.js.yoke > bundle.js
API
var yoke = require("yoke")
yoke("bundle.js.yoke").then(function(output){
console.log(output)
})
var output = await yoke("bundle.js.yoke")
yoke("bundle.js.yoke", function(err, output){
console.log(output)
})
License
MIT