@microsoft/fast-build 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -15
- package/package.json +1 -1
- package/wasm/microsoft_fast_build_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -1,18 +1,33 @@
|
|
|
1
|
-
#
|
|
1
|
+
# FAST Build
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
[](https://badge.fury.io/js/%40microsoft%2Ffast-build)
|
|
5
|
+
|
|
6
|
+
The `fast-build` package renders the declarative HTML template syntax of [`@microsoft/fast-element`](https://www.npmjs.com/package/@microsoft/fast-element), primarily for use in testing environments. It is powered by a WebAssembly core with zero runtime npm dependencies.
|
|
7
|
+
|
|
8
|
+
> **Note:** For production server-side rendering, we recommend using the [`@microsoft/webui`](https://github.com/microsoft/webui) project instead.
|
|
4
9
|
|
|
5
10
|
## Installation
|
|
6
11
|
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
### From NPM
|
|
13
|
+
|
|
14
|
+
To install the latest `@microsoft/fast-build` package using `npm`:
|
|
15
|
+
|
|
16
|
+
```shell
|
|
17
|
+
npm install --save @microsoft/fast-build
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Within your JavaScript or TypeScript code, you can then import library APIs like this:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import { render } from '@microsoft/fast-build';
|
|
9
24
|
```
|
|
10
25
|
|
|
11
26
|
## CLI usage
|
|
12
27
|
|
|
13
28
|
Once installed, the `fast` binary is available. Use the `build` subcommand to render an HTML template with a JSON state file:
|
|
14
29
|
|
|
15
|
-
```
|
|
30
|
+
```shell
|
|
16
31
|
fast build [options]
|
|
17
32
|
```
|
|
18
33
|
|
|
@@ -49,7 +64,7 @@ And a `state.json`:
|
|
|
49
64
|
|
|
50
65
|
Run:
|
|
51
66
|
|
|
52
|
-
```
|
|
67
|
+
```shell
|
|
53
68
|
fast build --entry=index.html --state=state.json --output=output.html
|
|
54
69
|
```
|
|
55
70
|
|
|
@@ -68,7 +83,7 @@ Produces `output.html`:
|
|
|
68
83
|
|
|
69
84
|
Pass a glob pattern (or comma-separated list of patterns) to `--templates` to expand custom elements into [Declarative Shadow DOM](https://developer.chrome.com/docs/css-ui/declarative-shadow-dom):
|
|
70
85
|
|
|
71
|
-
```
|
|
86
|
+
```shell
|
|
72
87
|
fast build \
|
|
73
88
|
--templates="./components/**/*.html" \
|
|
74
89
|
--entry=index.html \
|
|
@@ -93,11 +108,3 @@ If an `<f-template>` element has no `name` attribute, a warning is printed and i
|
|
|
93
108
|
## Template syntax
|
|
94
109
|
|
|
95
110
|
Template syntax follows the FAST declarative HTML format. See the [`@microsoft/fast-html` README](../fast-html/README.md) for full documentation on bindings, conditionals, repeats, and directives.
|
|
96
|
-
|
|
97
|
-
## Contributing
|
|
98
|
-
|
|
99
|
-
See [CONTRIBUTING.md](./CONTRIBUTING.md).
|
|
100
|
-
|
|
101
|
-
## License
|
|
102
|
-
|
|
103
|
-
[](https://opensource.org/licenses/MIT)
|
package/package.json
CHANGED
|
Binary file
|