yoke
v0.1.3
Published
preprocessor that does language agnostic concatenation
Maintainers
Readme
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 yokeExample
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.jsYoke 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.yokeTo save, simply pipe the output to a destination file.
yoke bundle.js.yoke > bundle.jsAPI
var yoke = require("yoke")
// Using Promises
yoke("bundle.js.yoke").then(function(output){
console.log(output)
})
// Using async/await
var output = await yoke("bundle.js.yoke")
// Using callbacks
yoke("bundle.js.yoke", function(err, output){
console.log(output)
})License
MIT
