Skip to content

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

Notifications You must be signed in to change notification settings

yazgazan/bufferify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published