@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 CHANGED
@@ -1,18 +1,33 @@
1
- # `@microsoft/fast-build`
1
+ # FAST Build
2
2
 
3
- Server-side renderer for [FAST](https://www.fast.design/) declarative HTML templates, powered by a WebAssembly core with zero runtime npm dependencies.
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
+ [![npm version](https://badge.fury.io/js/%40microsoft%2Ffast-build.svg)](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
- ```sh
8
- npm install @microsoft/fast-build
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
- ```sh
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
- ```sh
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
- ```sh
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
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/fast-build",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "CLI and Node.js API for server-side rendering of FAST declarative HTML templates.",
5
5
  "author": {
6
6
  "name": "Microsoft",
Binary file