@soleil-se/app-util 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/README.md +4 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -16,6 +16,7 @@ Get HTML for rendering a Vue application.
16
16
  | name | `String` | | Name of the app, has to match the name of the Vue application. |
17
17
  | data | `Object` | | Data that will be available in `$options`. |
18
18
  | [noScript] | `String` | `''` | HTML that will be printed when JavaScript is not available. |
19
+
19
20
  ```javascript
20
21
  router.get('/', (req, res) => {
21
22
  res.send(renderVue('AppName', data, noScript));
@@ -29,6 +30,7 @@ Get URI for a route.
29
30
  | Param | Type | Description |
30
31
  | --- | --- | --- |
31
32
  | route | `String` | A route. |
33
+
32
34
  ```javascript
33
35
  const routeUri = getRouteUri('/my-route');
34
36
  ```
@@ -40,6 +42,7 @@ Get URI for a resource.
40
42
  | Param | Type | Description |
41
43
  | --- | --- | --- |
42
44
  | resource | `String` | A resource. |
45
+
43
46
  ```javascript
44
47
  const resourceUri = getResourceUri('file/in/resource.png');
45
48
  ```
@@ -52,6 +55,7 @@ Renders a Underscore template and returns a string.
52
55
  | --- | --- | --- | --- |
53
56
  | template | `String` | | Underscore template. |
54
57
  | [values] | `Object` | `{}` | Values. |
58
+
55
59
  ```javascript
56
60
  const string = renderTemplate('<div><%= foo %></div>', {
57
61
  foo: 'bar',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soleil-se/app-util",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "main": "./dist/index.js",
5
5
  "author": "Soleil AB",
6
6
  "license": "UNLICENSED",