@canonical/maas-react-components 0.1.0 → 1.0.0
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 +44 -0
- package/dist/canonical-maas-react-components-1.0.0.tgz +0 -0
- package/package.json +50 -8
- package/dist/@canonical/maas-react-components.es.d.ts +0 -1
- package/dist/@canonical/maas-react-components.es.js +0 -1
- package/dist/@canonical/maas-react-components.umd.js +0 -1
- package/dist/src/lib/index.d.ts +0 -0
- package/dist/vite.config.d.ts +0 -2
- package/dist/vitest-setup.d.ts +0 -0
- package/src/lib/index.ts +0 -0
package/README.md
CHANGED
|
@@ -6,3 +6,47 @@ It contains components that are either specific to, or only used in MAAS. Genera
|
|
|
6
6
|
[@canonical/react-components](https://github.com/canonical/react-components) instead.
|
|
7
7
|
|
|
8
8
|
Read more in [Project philosophy and guidelines](GUIDELINES.md).
|
|
9
|
+
|
|
10
|
+
## Getting started
|
|
11
|
+
|
|
12
|
+
### Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @canonical/maas-react-components
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
or using yarn:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
yarn add @canonical/maas-react-components
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Add styles import to your app:
|
|
25
|
+
|
|
26
|
+
```css
|
|
27
|
+
@import "@canonical/maas-react-components/dist/style.css";
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Development with `maas-react-components`
|
|
31
|
+
|
|
32
|
+
To see the changes you make to `maas-react-components` reflected in a consuming app immediately, follow these steps:
|
|
33
|
+
|
|
34
|
+
1. In the `maas-react-components` directory, run the following command to create a symlink:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
yarn link
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
2. In the consuming repository (e.g., `maas-ui`), run the following command to use the local version of `maas-react-components`:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
yarn link "@canonical/maas-react-components"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
3. Go back to `maas-react-components` directory and run the following command to start the build process with the watch flag:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm run build:watch
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
4. As you make changes to `maas-react-components` they will be automatically built and reflected in the consuming app.
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,44 +1,86 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonical/maas-react-components",
|
|
3
3
|
"description": "React components for use in MAAS UI projects.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "
|
|
7
|
+
"url": "https://github.com/canonical/maas-react-components.git"
|
|
8
8
|
},
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/canonical/maas-react-components/issues"
|
|
11
11
|
},
|
|
12
12
|
"homepage": "https://github.com/canonical/maas-react-components#readme",
|
|
13
|
-
"main": "
|
|
13
|
+
"main": "./dist/@canonical/maas-react-components.umd.js",
|
|
14
|
+
"module": "./dist/@canonical/maas-react-components.es.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"import": "./dist/@canonical/maas-react-components.es.js",
|
|
20
|
+
"require": "./dist/@canonical/maas-react-components.umd.js"
|
|
21
|
+
},
|
|
22
|
+
"./dist/style.css": {
|
|
23
|
+
"import": "./dist/style.css",
|
|
24
|
+
"require": "./dist/style.css"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
14
27
|
"files": [
|
|
15
|
-
"dist
|
|
28
|
+
"dist"
|
|
16
29
|
],
|
|
17
30
|
"license": "AGPL-3.0",
|
|
18
31
|
"scripts": {
|
|
19
32
|
"prepare": "husky install",
|
|
20
33
|
"build": "tsc && vite build",
|
|
21
34
|
"build:watch": "tsc && vite build --watch",
|
|
35
|
+
"lint": "eslint src && tsc --noEmit",
|
|
36
|
+
"lint:fix": "eslint --fix src",
|
|
37
|
+
"format": "prettier --write 'src/**/*.{ts,tsx,css,md,json}' --config ./.prettierrc",
|
|
22
38
|
"test": "vitest run",
|
|
23
39
|
"test:ui": "vitest --ui",
|
|
24
|
-
"test:watch": "vitest"
|
|
40
|
+
"test:watch": "vitest",
|
|
41
|
+
"semantic-release": "semantic-release",
|
|
42
|
+
"semantic-release-dry-run": "semantic-release --dry-run --no-ci"
|
|
25
43
|
},
|
|
26
44
|
"devDependencies": {
|
|
27
45
|
"@commitlint/cli": "^17.7.1",
|
|
28
46
|
"@commitlint/config-conventional": "^17.7.0",
|
|
47
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
48
|
+
"@semantic-release/git": "^10.0.1",
|
|
29
49
|
"@testing-library/jest-dom": "^6.1.3",
|
|
30
50
|
"@testing-library/react": "^14.0.0",
|
|
31
51
|
"@testing-library/user-event": "^14.5.1",
|
|
52
|
+
"@types/react-dom": "18.2.7",
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^6.7.3",
|
|
54
|
+
"@typescript-eslint/parser": "^6.7.3",
|
|
32
55
|
"@vitejs/plugin-react": "^4.1.0",
|
|
56
|
+
"eslint": "^8.50.0",
|
|
57
|
+
"eslint-config-prettier": "^9.0.0",
|
|
58
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
59
|
+
"eslint-plugin-import": "^2.28.1",
|
|
60
|
+
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
61
|
+
"eslint-plugin-no-relative-import-paths": "^1.5.2",
|
|
62
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
63
|
+
"eslint-plugin-react": "^7.33.2",
|
|
64
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
65
|
+
"eslint-plugin-unused-imports": "^3.0.0",
|
|
33
66
|
"husky": "8.0.0",
|
|
67
|
+
"prettier": "^3.0.3",
|
|
34
68
|
"sass": "^1.68.0",
|
|
69
|
+
"semantic-release": "^22.0.5",
|
|
35
70
|
"vite": "^4.4.9",
|
|
36
71
|
"vite-plugin-dts": "^3.6.0",
|
|
37
72
|
"vitest": "^0.34.5"
|
|
38
73
|
},
|
|
39
|
-
"
|
|
40
|
-
"react": "
|
|
41
|
-
"react-dom": "
|
|
74
|
+
"resolutions": {
|
|
75
|
+
"@types/react": "18.2.14",
|
|
76
|
+
"@types/react-dom": "18.2.6"
|
|
77
|
+
},
|
|
78
|
+
"peerDependencies": {
|
|
79
|
+
"@canonical/react-components": "^0.47.0",
|
|
80
|
+
"@types/react": "^17.0.2 || ^18.0.0",
|
|
81
|
+
"@types/react-dom": "^17.0.2 || ^18.0.0",
|
|
82
|
+
"react": "18.2.0",
|
|
83
|
+
"react-dom": "18.2.0",
|
|
42
84
|
"vanilla-framework": "^4.3.0"
|
|
43
85
|
}
|
|
44
86
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../src/lib/index'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(n){typeof define=="function"&&define.amd?define(n):n()})(function(){"use strict"});
|
package/dist/src/lib/index.d.ts
DELETED
|
File without changes
|
package/dist/vite.config.d.ts
DELETED
package/dist/vitest-setup.d.ts
DELETED
|
File without changes
|
package/src/lib/index.ts
DELETED
|
File without changes
|