1.1.0 • Published 10 years ago

file2ify v1.1.0

Weekly downloads
1
License
ISC
Repository
-
Last release
10 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

10 years ago

1.0.5

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago