UNPKG

1.26 kBMarkdownView Raw
1## var files = build.files(nodes, [options])
2
3This is the simplest builder. This just iterates through all the files you choose and allows you to do whatever you wish with them. `.end()`'s callback doesn't return anything.
4
5Known limitiations:
6
7- This builder does __not__ handle symlinks.
8
9## Plugins
10
11Note that these two following plugins are unnecessary in development if you serve from both "components/" and ".". These plugins simply rewrite files to `build/` based on your apps directories.
12
13For example, doing the following in development would make the file builder unnecessary:
14
15```js
16var app = require('express')();
17var static = require('serve-static');
18
19// serve your dependencies
20app.use(static(__dirname + '/components'));
21
22// serve your entire app
23app.use(static(__dirname));
24```
25
26### copy()
27
28Copies each file to the destination with the directory `<user>/<repo>/<version>`. You probably want to use this when creating a production build.
29
30```js
31build.files()
32 .use('images', builder.plugins.copy())
33```
34
35### symlink()
36
37Very similar to `copy()`, but symlinks (or "creates shortcuts") instead. This is faster during development. Note that this will only work on UNIX-like systems.
38
39```js
40build.files()
41 .use('images', builder.plugins.symlink())
42```