easy-with-style 3.0.252 → 3.0.255

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
@@ -20,6 +20,24 @@ You can also clone the repository with [Git](https://git-scm.com/)...
20
20
 
21
21
  You can also run a development server, see the section on building later on.
22
22
 
23
+ ## Example
24
+
25
+ There is a small development server that can be run from within the project's directory with the following command:
26
+
27
+ npm start
28
+
29
+ The example will then be available at the following URL:
30
+
31
+ http://localhost:8888
32
+
33
+ The source for the example can be found in the `src/example.js` file and corresponding `src/example` folder. You are encouraged to try the example whilst reading what follows. You can rebuild it on the fly with the following command:
34
+
35
+ npm run watch-debug
36
+
37
+ The development server will reload the page whenever you make changes.
38
+
39
+ One last thing to bear in mind is that this package is included by way of a relative rather than a package import. If you are importing it into your own application, however, you should use the standard package import.
40
+
23
41
  ## Usage
24
42
 
25
43
  You must call the `renderStyles()` function *after* importing the view but *before* rendering it. Doing so ensures that the styles generated as a result of executing the view code are inserted into the DOM before the view itself.
@@ -45,22 +63,6 @@ body.mount(
45
63
  ```
46
64
  Note that rendering the styles in this way is not done as part of the build process, you must explicitly call the `renderStyles()` function, ideally right before you attach the view to the body.
47
65
 
48
- ## Example
49
-
50
- There is a small development server that can be run from within the project's directory with the following command:
51
-
52
- npm start
53
-
54
- The example will then be available at the following URL:
55
-
56
- http://localhost:8888
57
-
58
- The source for the example can be found in the `src/example.js` file and corresponding `src/example` folder. You are encouraged to try the example whilst reading what follows. You can rebuild it on the fly with the following command:
59
-
60
- npm run watch-debug
61
-
62
- The development server will reload the page whenever you make changes.
63
-
64
66
  ## Creating primitive elements with style
65
67
 
66
68
  All of the standard HTML elements are supported. For a complete list of tag names, see the [`tagNames.js`](https://github.com/djalbat/with-style/blob/master/es6/tagNames.js) file. You can create these elements, which are functional elements under the hood, as follows: