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 +18 -26
- package/dist/joe-header.js +1000 -0
- package/package.json +15 -46
- package/types/joe-header.d.ts +23 -0
- package/types/styles.d.ts +1 -0
- package/dist/09f1928b29200db5fa67.woff2 +0 -0
- package/dist/326.joeheader.js +0 -2
- package/dist/326.joeheader.js.map +0 -1
- package/dist/704.joeheader.js +0 -2
- package/dist/704.joeheader.js.map +0 -1
- package/dist/8d4be353e363dc40d9a4.svg +0 -6
- package/dist/cf5ca5faf868e168f3ab.woff +0 -0
- package/dist/index.html +0 -1
- package/dist/joeheader.js +0 -2
- package/dist/joeheader.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,30 +1,24 @@
|
|
|
1
1
|
## Joe header
|
|
2
2
|
|
|
3
|
-
|
|
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
|
|
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
|
-
<
|
|
18
|
-
<script
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
#
|
|
31
|
+
# Install dependencies.
|
|
38
32
|
yarn install
|
|
39
33
|
|
|
40
|
-
#
|
|
34
|
+
# Serve with hot reload at localhost.
|
|
41
35
|
yarn dev
|
|
42
36
|
|
|
43
|
-
#
|
|
44
|
-
yarn
|
|
37
|
+
# Build npm ready bundles to be consumed by other web apps. Builds to dist folder.
|
|
38
|
+
yarn build
|
|
45
39
|
|
|
46
|
-
#
|
|
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
|
-
#
|
|
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
|
|
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
|
-
|
|
55
|
+
- Always install beta with `npm install packagename@beta`
|
|
56
|
+
- Install specific version with `npm install package@0.1.120-beta.1`
|