Miss any of our Open RFC calls?Watch the recordings here! »

bufferify

0.0.1 • Public • Published

Bufferify

Bufferify is a browserify transform allowing to require text file as buffers.

This can be used to include templates (such as ejs or handlebars template files) in a bundle.

Example

raw.txt :


This is raw text.

main.js :

var buf = require('./raw.txt');
 
console.log(buf.toString('utf-8'));
browserify -t [ bufferify .txt .data ] main.js -o bundle.js

Output :


This is raw text.


Todo

  • Provide more configuration options such as regex or glob matching in addition to extentions.

Install

npm i bufferify

DownloadsWeekly Downloads

2

Version

0.0.1

License

ISC

Last publish

Collaborators

  • avatar