2.1.1 • Published 9 years ago

textrequireify v2.1.1

Weekly downloads
18
License
-
Repository
github
Last release
9 years ago

textrequireify

Browserify transform that includes text files using requireText('module/filename') syntax.

Usage

JS files

The transform is only applied to JS files with a .js extension. It can include any file as long as it's UTF-8 encoded.

requireText('modulename/file.ext');

This expression will be replaced with a string with contents of the file.ext from modulename module.

requireText('./relative/path/file.ext');

File will be loaded from the path relative to the file containing the requireText() call.

Browserify API

	var textrequireify = require('textrequireify');

	browserify.transform(textrequireify.create({
		rootDirectory: "/path/to/bower_components/",
	}));
2.1.1

9 years ago

2.1.0

9 years ago

2.0.1

9 years ago

1.0.0

10 years ago