Skip to content

Commit 9548e83

Browse files
committed
Add README
1 parent 7d9a16c commit 9548e83

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

dist/README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# dist
2+
3+
> Distributable files.
4+
5+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
6+
7+
<section class="intro">
8+
9+
This directory contains distributable files for use in browser environments. Each distributable is a standalone [UMD][umd] bundle which, if no recognized module system is present, will expose bundle contents to the global scope.
10+
11+
</section>
12+
13+
<!-- /.intro -->
14+
15+
<!-- Section to include usage notes. -->
16+
17+
<section class="usage">
18+
19+
## Usage
20+
21+
```html
22+
<script type="text/javascript" src="/path/to/<bundle>.js"></script>
23+
```
24+
25+
For example, to include the main un-minified bundle which exposes a flat namespace
26+
27+
```html
28+
<script type="text/javascript" src="/path/to/stdlib-flat.js"></script>
29+
```
30+
31+
If no recognized module system is present, access bundle contents via the global scope. For example, assuming a flat namespace,
32+
33+
```html
34+
<script type="text/javascript">
35+
var erf = stdlib.erf;
36+
console.log( erf( 0.5 ) );
37+
</script>
38+
```
39+
40+
</section>
41+
42+
<!-- /.usage -->
43+
44+
<!-- Section to include usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
45+
46+
<section class="notes">
47+
48+
## Notes
49+
50+
- Bundles are one of two namespace types: `flat` or `tree`. A `tree` namespace is a nested object namespace which mirrors the project's layout (e.g., `stdlib.math.base.special.erf`. A `flat` namespace uses the global project namespace, where each project package has a unique alias (e.g., `stdlib.base.erf`). Which namespace is preferred depends on personal taste and application context.
51+
52+
</section>
53+
54+
<!-- /.notes -->
55+
56+
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
57+
58+
<section class="links">
59+
60+
[umd]: https://github.com/umdjs/umd
61+
62+
</section>
63+
64+
<!-- /.links -->

0 commit comments

Comments
 (0)