@iamproperty/components 3.4.4 → 3.4.5
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 +30 -66
- package/assets/js/scripts.bundle.js +1 -1
- package/assets/js/scripts.bundle.min.js +1 -1
- package/dist/components.es.js +540 -603
- package/dist/components.umd.js +10 -10
- package/dist/style.css +1 -1
- package/package.json +7 -4
- package/src/index.js +0 -1
- package/assets/sass/components/drawer.scss +0 -47
- package/src/components/Drawer/Drawer.vue +0 -53
- package/src/components/Drawer/README.md +0 -23
package/README.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
# Getting started
|
|
2
3
|
|
|
3
4
|
## Using the component library or assets
|
|
@@ -10,9 +11,7 @@ npm install @iamproperty/components --save
|
|
|
10
11
|
### Usage
|
|
11
12
|
|
|
12
13
|
#### Static assets
|
|
13
|
-
|
|
14
|
-
The assets folder can be used independently from the Vue components so that they can be used with other frameworks. With the compiled files available to use out of the box alongside the source files that can be configured.
|
|
15
|
-
|
|
14
|
+
The assets folder can be used independently from the Vue components so that they can be used with other frameworks. With the compiled files available to use out of the box alongside the source files that can be configured.
|
|
16
15
|
```
|
|
17
16
|
<link href="./node_modules/@iamproperty/components/assets/css/style.min.css" as="style" />
|
|
18
17
|
<script src="./node_modules/@iamproperty/components/assets/js/scripts.bundle.min.js"></script>
|
|
@@ -28,64 +27,31 @@ The assets folder can be used independently from the Vue components so that they
|
|
|
28
27
|
import navbar from @iamproperty/components/assets/js/modules/navbar.js
|
|
29
28
|
```
|
|
30
29
|
|
|
31
|
-
|
|
32
30
|
#### Vue application
|
|
33
|
-
|
|
34
31
|
```
|
|
35
32
|
import '@iamproperty/components/assets/css/core.min.css'
|
|
36
|
-
import '@iamproperty/components/dist/
|
|
33
|
+
import '@iamproperty/components/dist/style.css'
|
|
37
34
|
|
|
38
35
|
import * as iamkey from '@iamproperty/components'
|
|
39
36
|
for (const [key, value] of Object.entries(iamkey)) {
|
|
40
37
|
Vue.component(key, value)
|
|
41
38
|
}
|
|
42
39
|
```
|
|
43
|
-
|
|
44
40
|
Components then can be used as described in the design system documentation.
|
|
45
|
-
|
|
46
41
|
```
|
|
47
42
|
<Header title="Page title" image="../../assets/image.jpeg"><p>Page description</p></Header>
|
|
48
43
|
```
|
|
49
44
|
|
|
50
|
-
#### NUXT
|
|
51
|
-
|
|
52
|
-
To use the components in NUXT you firstly need to add create a plugin file called plugins/iamkey.js and add the below code.
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
import Vue from 'vue'
|
|
56
|
-
|
|
57
|
-
import '@iamproperty/components/assets/css/core.min.css'
|
|
58
|
-
import '@iamproperty/components/dist/components.css'
|
|
59
|
-
|
|
60
|
-
import * as iamkey from '@iamproperty/components'
|
|
61
|
-
for (const [key, value] of Object.entries(iamkey)) {
|
|
62
|
-
Vue.component(key, value)
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Then add the plugin to the nuxt.config.js file.
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
export default {
|
|
70
|
-
plugins: [
|
|
71
|
-
'plugins/iamkey.js'
|
|
72
|
-
],
|
|
73
|
-
}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
|
|
77
45
|
## Contributing to iam key
|
|
78
46
|
|
|
79
47
|
### Create code branch
|
|
80
|
-
|
|
81
|
-
Firstly the clone the [repo](https://github.com/iamproperty/iamproperty-vue-component-library) from GitHub and create a new branch using the agreed naming conventention.
|
|
48
|
+
Firstly the clone the [repo](https://github.com/iamproperty/iamproperty.github.io) from GitHub and create a new branch from the develop branch using the agreed naming convention (FEG-99/feature/task-title).
|
|
82
49
|
|
|
83
50
|
### Commands
|
|
84
51
|
|
|
85
52
|
#### Install node packages
|
|
86
|
-
|
|
87
53
|
```
|
|
88
|
-
npm install
|
|
54
|
+
npm install --force
|
|
89
55
|
```
|
|
90
56
|
|
|
91
57
|
#### Development local web server
|
|
@@ -93,24 +59,30 @@ npm install
|
|
|
93
59
|
Setup a local web server to run the documentation site this will allow you to modify the code and check it.
|
|
94
60
|
|
|
95
61
|
```
|
|
96
|
-
npm run
|
|
62
|
+
npm run dev
|
|
97
63
|
```
|
|
64
|
+
OR
|
|
65
|
+
```
|
|
66
|
+
npm run watch
|
|
67
|
+
```
|
|
68
|
+
The second command will run dev but will also watch for sass and typescript files being changed which would then update the CSS and JavaScript files.
|
|
98
69
|
|
|
99
|
-
#### Run
|
|
100
|
-
|
|
101
|
-
**This command should be ran while the local web server is still running.**
|
|
102
|
-
|
|
70
|
+
#### Run unit tests
|
|
103
71
|
Unit tests should be ran after changing any code to make sure it has no unwanted side effects.
|
|
104
|
-
|
|
105
|
-
The visual regression tests may differ greatly if the tests are running on a windows when the the snapshots where created on Mac.
|
|
106
|
-
|
|
107
72
|
```
|
|
108
73
|
npm run test
|
|
109
74
|
```
|
|
110
|
-
|
|
75
|
+
**This command is ran when a PR is created to give the reviewer confidence that their hasn't been any unforeseen side effects**
|
|
76
|
+
|
|
77
|
+
#### Run visual regression test
|
|
78
|
+
**This command should be ran while the local web server is still running. The localURL variable in package.json file needs to match the local web server.**
|
|
79
|
+
```
|
|
80
|
+
npm run visual
|
|
81
|
+
```
|
|
82
|
+
The visual regression tests may differ greatly if the tests are running on a windows when the the snapshots where created on Mac.
|
|
83
|
+
|
|
111
84
|
#### Prepare for pull request
|
|
112
|
-
|
|
113
|
-
**This command should be ran while the local web server is still running.**
|
|
85
|
+
**This command should be ran while the local web server is still running. The localURL variable in package.json file needs to match the local web server.**
|
|
114
86
|
|
|
115
87
|
Before creating a pull request we want to make sure assets get re-compiled and audited so that we can keep an eye on file sizes. We also want to recreate visual regression snapshots. This will create a number of files that will be added to the pull request to help the reviewers make judgement on the changes.
|
|
116
88
|
|
|
@@ -118,24 +90,16 @@ Before creating a pull request we want to make sure assets get re-compiled and a
|
|
|
118
90
|
npm run pull-request
|
|
119
91
|
```
|
|
120
92
|
|
|
121
|
-
### Pull request
|
|
93
|
+
### Create Pull request into develop
|
|
94
|
+
You will not have the ability to commit changes directly to the main or develop branches and a pull request will have to be created. This pull request should follow the format dictated in the .github/pull_request_template.md file. The pull reguest should always be into develop unless you are doing a hotfix in a release branch. At least one approver is needed but for more complex bits of work more can be added. The pull request will run the unit tests and create a test environment in netlify for the reviewer to help complete the review. Once the pull request is closed the netlify development environment will get updated.
|
|
122
95
|
|
|
123
|
-
|
|
96
|
+
https://iamproperty-dev.netlify.app/
|
|
124
97
|
|
|
125
98
|
## Create release
|
|
99
|
+
The creation of an npm package is done through GitHub actions when a GitHub release is created. Releases can be made from any branch but it should come from the master branch.
|
|
100
|
+
<a href="https://www.npmjs.com/package/@iamproperty/components" target="_blank">npm registry package</a>.
|
|
126
101
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
npm login
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
After you are logged in then can publish but remember to increase the package version if the package.json file.
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
npm publish
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## Update https://iamproperty.github.io/
|
|
102
|
+
## Update the documentation site
|
|
103
|
+
To update the documentation site you need to create a pull request from develop or a release branch into master. Once the PR is approved an automatic build and deploy process using GitHub actions will be created.
|
|
140
104
|
|
|
141
|
-
|
|
105
|
+
https://iamproperty.github.io/
|