1 |
3a515b92
|
cagy
|
|
2 |
|
|
# constants-browserify
|
3 |
|
|
|
4 |
|
|
Node's `constants` module for the browser.
|
5 |
|
|
|
6 |
|
|
[](https://www.npmjs.org/package/constants-browserify)
|
7 |
|
|
|
8 |
|
|
## Usage
|
9 |
|
|
|
10 |
|
|
To use with browserify cli:
|
11 |
|
|
|
12 |
|
|
```bash
|
13 |
|
|
$ browserify -r constants:constants-browserify script.js
|
14 |
|
|
```
|
15 |
|
|
|
16 |
|
|
To use with browserify api:
|
17 |
|
|
|
18 |
|
|
```js
|
19 |
|
|
browserify()
|
20 |
|
|
.require('constants-browserify', { expose: 'constants' })
|
21 |
|
|
.add(__dirname + '/script.js')
|
22 |
|
|
.bundle()
|
23 |
|
|
// ...
|
24 |
|
|
```
|
25 |
|
|
|
26 |
|
|
## Installation
|
27 |
|
|
|
28 |
|
|
With [npm](http://npmjs.org) do
|
29 |
|
|
|
30 |
|
|
```bash
|
31 |
|
|
$ npm install constants-browserify
|
32 |
|
|
```
|
33 |
|
|
|
34 |
|
|
## License
|
35 |
|
|
|
36 |
|
|
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
37 |
|
|
|
38 |
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
39 |
|
|
of this software and associated documentation files (the "Software"), to deal
|
40 |
|
|
in the Software without restriction, including without limitation the rights
|
41 |
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
42 |
|
|
copies of the Software, and to permit persons to whom the Software is
|
43 |
|
|
furnished to do so, subject to the following conditions:
|
44 |
|
|
|
45 |
|
|
The above copyright notice and this permission notice shall be included in
|
46 |
|
|
all copies or substantial portions of the Software.
|
47 |
|
|
|
48 |
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
49 |
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
50 |
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
51 |
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
52 |
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
53 |
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
54 |
|
|
THE SOFTWARE.
|