Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

browserify-file => fileify

  • Loading branch information...
commit b2f0f91beeaaa66f638fea7a444f34727707f834 1 parent 68d61f8
@substack authored
View
20 README.markdown
@@ -1,5 +1,5 @@
-browserify-file
-===============
+fileify
+=======
Middleware for browserify to load non-js files like templates.
@@ -9,15 +9,15 @@ methods
````javascript
var express = require('express'); // or connect, whatevs
var app = express.createServer();
-var browserifyFile = require('browserify-file');
+var fileify = require('fileify');
var bundle = browserify();
-bundle.use(browserifyFile);
+bundle.use(fileify);
app.use(bundle)
````
-browserifyFile(name, dir, ext)
-------------------------------
+fileify(name, dir, ext)
+-----------------------
Make the files in `dir` available through `require(name)`.
@@ -26,7 +26,7 @@ Make the files in `dir` available through `require(name)`.
Optionally you can specify an extension `ext` which can be a filter function,
regexp, or string to match extensions. By default, returns all files.
-browserifyFile will do a recursive traversal of `dir` and return all the files
+fileify will do a recursive traversal of `dir` and return all the files
except for hidden ones unless you specify a callback for `ext`.
example
@@ -48,8 +48,8 @@ var bundle = browserify({
});
app.use(bundle);
-var browserifyFile = require('browserify-file');
-bundle.use(browserifyFile('files', __dirname + '/files'));
+var fileify = require('fileify');
+bundle.use(fileify('files', __dirname + '/files'));
````
````html
@@ -87,7 +87,7 @@ installation
With [npm](http://npmjs.org) do:
- npm install browserify-file
+ npm install fileify
license
=======
View
5 example/jade/server.js
@@ -1,6 +1,7 @@
var express = require('express');
var app = express.createServer();
app.use(express.static(__dirname + '/static'));
+app.set('views', __dirname + '/views');
app.listen(8080);
console.log('Listening on 8080');
@@ -16,5 +17,5 @@ var bundle = browserify({
});
app.use(bundle);
-var browserifyFile = require('browserify-file');
-bundle.use(browserifyFile('views', __dirname + '/views'));
+var fileify = require('fileify');
+bundle.use(fileify('views', __dirname + '/views'));
View
2  example/jade/views/index.jade
@@ -1,6 +1,6 @@
!!!
head
- title browserify-file jade demo
+ title fileify jade demo
link(rel='stylesheet', href='/site.css')
script(type='text/javascript', src='/browserify.js')
body
View
4 example/simple/server.js
@@ -11,5 +11,5 @@ var bundle = browserify({
});
app.use(bundle);
-var browserifyFile = require('browserify-file');
-bundle.use(browserifyFile('files', __dirname + '/files'));
+var fileify = require('fileify');
+bundle.use(fileify('files', __dirname + '/files'));
View
2  package.json
@@ -1,5 +1,5 @@
{
- "name" : "browserify-file",
+ "name" : "fileify",
"version" : "0.0.1",
"description" : "Browserify middleware to load entire files into javascript variables",
"main" : "index.js",

0 comments on commit b2f0f91

Please sign in to comment.
Something went wrong with that request. Please try again.