1.1.0 • Published 8 years ago

file2ify v1.1.0

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

This is a simple loader for browserify, like file-loader for webpack.

file2ify is extending features as much as possible like file-loader.

E.g:

var tpl = require('./tpl.html');
var obj = {
    hello : 'hello'
}
tpl.replace(/\$\{test\}/g, obj.hello);

It's to require a html file, rendering in js file.

Setup:

npm install file2ify --production

use like :

bundle.transform( file2ify, {
    extension : ['html', 'css', 'json'] //be able to require file's type
} ).

or:

"browserify": {
    "transform": [
        ["file2ify", { "extension" : ['html', 'css', 'json'] }]
    ]
}

examples :

npm run example

Important:

1, It's updating now, so can be able to require file's type is html, css, json.

2, css return String.

1.1.0

8 years ago

1.0.5

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago