Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

browserify-file => fileify

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

0 comments on commit b2f0f91

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