Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 33 lines (25 sloc) 0.852 kb
43c6e71 Henry Hsu initial commit
authored
1 distjs
2 ======
3
5dad53e Henry Hsu Update README.md
authored
4 DistJS is an opinionated way to package your code and its dependencies into one distributable file.
5
6 ## Opinions
7
8 1. `make build` generates a single JS file in the `dist` folder (can be customized; see below)
9 2. Name of dist file should match name of module (snake-cased; see below)
10 3. Generally unobtrusive. Exposes 1 external variable matching the name of the module (camel-cased)
11 4. NPM compatible (`package.json`)
12 5. The dist file encapsulates __all__ of its dependencies
13 6. Any dependencies must also adhere to these opinions
14
15 ## Customization
16
17 You can customize how a dependency is evaluated by the following customizations to your `package.json`.
18
19 ### package.json
20
21 ```json
22 {
23 ...
24 "dist": {
25 "<module_name>": {
26 "make": "<build script command>",
27 "fileName": "<filename to use from module>"
28 }
29 },
30 ...
31 }
32 ```
Something went wrong with that request. Please try again.