joe-header 1.1.4 → 2.0.0-beta2

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,30 +1,24 @@
1
1
  ## Joe header
2
2
 
3
- Preact header application to be consumed on joejuice websites. Currently this is packaged and published to npm
3
+ Web component to be consumed on joe and the juice websites. Currently this is packaged and published to npm.
4
4
 
5
5
  ## How to use
6
6
 
7
- After publishing to npm its possible to use unpkg to import the bundled widget. The package will look for a `.header` to attach itself to.
7
+ After publishing to npm then it is possible to use unpkg to import the module.
8
8
 
9
9
  If a new version is available then use that version in the path, e.g. https://unpkg.com/joe-header@0.1.new-version/dist/joeheader.js
10
10
 
11
- Add this to index.html of the project where you want to use the header.
11
+ Add this to the index.html file of the project where you want to use the header.
12
12
 
13
13
  ```html
14
14
  <!-- index.html -->
15
15
  ...
16
16
  <body>
17
- <div class="joe-web-header"></div>
18
- <script async src="https://unpkg.com/joe-header/dist/joeheader.js"></script>
19
- <!-- <script async src="https://unpkg.com/joe-header@0.1.70/dist/joeheader.js"></script> -->
20
-
21
- <script>
22
- // The component will init itsself but incase that it doesnt happen, try to wait for the dom to finish loading
23
- window.addEventListener('DOMContentLoaded', (event) => {
24
- joeheader.init();
25
- });
26
- </script>
27
-
17
+ <joe-header></joe-header>
18
+ <script
19
+ type="module"
20
+ src="https://unpkg.com/joe-header@2.0.0-beta1/dist/joe-header.js"
21
+ ></script>
28
22
  </body>
29
23
  ...
30
24
  ```
@@ -34,31 +28,29 @@ Add this to index.html of the project where you want to use the header.
34
28
  ALWAYS REMEMBER TO BUNBLDE FIRST
35
29
 
36
30
  ```bash
37
- # install dependencies
31
+ # Install dependencies.
38
32
  yarn install
39
33
 
40
- # serve with hot reload at localhost:8080
34
+ # Serve with hot reload at localhost.
41
35
  yarn dev
42
36
 
43
- # build npm ready bundles to be consumed by other Preact web apps. Builds to dist folder
44
- yarn bundle
37
+ # Build npm ready bundles to be consumed by other web apps. Builds to dist folder.
38
+ yarn build
45
39
 
46
- # usefull command to patch version number (x.x.x+1). Can also be done in package.json manually
47
- npm version patch
40
+ # Usefull command to patch version number (x.x.x+1). Can also be done in package.json manually.
41
+ npm version patch
48
42
 
49
- # publish new bundle to npm. Build a new widget and increase version number in order to publish
43
+ # Publish new build to npm. Build a new widget and increase version number in order to publish.
50
44
  npm publish
51
45
  ```
52
46
 
53
47
  ## Beta tags
54
48
 
55
- 1. `yarn bundle`
49
+ 1. `yarn build`
56
50
  2. Modify version in package.json to the following format (match with existing verion numbers etc) `"version": "0.1.120-beta.1"` where beta.x is the number of those betas
57
51
  3. Publish to npm `npm publish --tag beta`
58
52
 
59
53
  There are two options for install:
60
- * Always install beta with `npm install packagename@beta`
61
- * Install specific version with `npm install package@0.1.120-beta.1`
62
-
63
54
 
64
- For detailed explanation on how things work, checkout the [CLI Readme](https://github.com/preactjs/preact-cli/blob/master/README.md).
55
+ - Always install beta with `npm install packagename@beta`
56
+ - Install specific version with `npm install package@0.1.120-beta.1`