@loopr-ai/craft 0.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 +38 -0
- package/dist/components/cell/Button/index.d.ts +5 -0
- package/dist/components/cell/Button/index.js +6 -0
- package/dist/components/cell/Input/index.d.ts +5 -0
- package/dist/components/cell/Input/index.js +6 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +6 -0
- package/dist/vite-env.d.js +1 -0
- package/package.json +50 -0
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Loopr Craft
|
|
2
|
+
|
|
3
|
+
A component library for LooprAI products. Based out of Material UI.
|
|
4
|
+
|
|
5
|
+
## Expanding the ESLint configuration
|
|
6
|
+
|
|
7
|
+
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
|
|
8
|
+
|
|
9
|
+
- Configure the top-level `parserOptions` property like this:
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
parserOptions: {
|
|
13
|
+
ecmaVersion: 'latest',
|
|
14
|
+
sourceType: 'module',
|
|
15
|
+
project: ['./tsconfig.json', './tsconfig.node.json'],
|
|
16
|
+
tsconfigRootDir: __dirname,
|
|
17
|
+
},
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
|
|
21
|
+
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
|
|
22
|
+
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
|
|
23
|
+
|
|
24
|
+
## Component Library
|
|
25
|
+
|
|
26
|
+
Ref: [Creating a Component Library Fast🚀(using Vite's library mode)](https://dev.to/receter/how-to-create-a-react-component-library-using-vites-library-mode-4lma)
|
|
27
|
+
|
|
28
|
+
### Commands
|
|
29
|
+
1. Build the library: `npm run build-lib`
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
This needs to be built and published to a package manager (npm, yarn, etc) eventually.
|
|
34
|
+
For now, it can be used as a local dependency. by following these steps:
|
|
35
|
+
1. Build the library: `npm run build-lib`
|
|
36
|
+
2. follow the steps in [Use npm pack to test your packages locally](https://dev.to/scooperdev/use-npm-pack-to-test-your-packages-locally-486e)
|
|
37
|
+
|
|
38
|
+
**More Info: TBD**
|
package/dist/main.d.ts
ADDED
package/dist/main.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@loopr-ai/craft",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "Component library based out of Matetial UI customized to support Loopr AI products",
|
|
5
|
+
"homepage": "https://loopr.ai",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Loopr AI",
|
|
8
|
+
"url": "https://loopr.ai"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "dist/main.js",
|
|
12
|
+
"types": "dist/main.d.ts",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"dev": "vite",
|
|
18
|
+
"build": "tsc && vite build",
|
|
19
|
+
"build-lib": "tsc --p ./tsconfig-build.json && vite build",
|
|
20
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
21
|
+
"preview": "vite preview",
|
|
22
|
+
"prepublishOnly": "npm run build-lib"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"react": "^18.2.0",
|
|
26
|
+
"react-dom": "^18.2.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^20.5.7",
|
|
30
|
+
"@types/react": "^18.2.15",
|
|
31
|
+
"@types/react-dom": "^18.2.7",
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
33
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
34
|
+
"@vitejs/plugin-react": "^4.0.3",
|
|
35
|
+
"eslint": "^8.45.0",
|
|
36
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
37
|
+
"eslint-plugin-react-refresh": "^0.4.3",
|
|
38
|
+
"glob": "^10.3.4",
|
|
39
|
+
"typescript": "^5.0.2",
|
|
40
|
+
"vite": "^4.4.5",
|
|
41
|
+
"vite-plugin-dts": "^3.5.3",
|
|
42
|
+
"vite-plugin-lib-inject-css": "^1.2.1"
|
|
43
|
+
},
|
|
44
|
+
"sideEffects": [
|
|
45
|
+
"**/*.css"
|
|
46
|
+
],
|
|
47
|
+
"volta": {
|
|
48
|
+
"node": "20.4.0"
|
|
49
|
+
}
|
|
50
|
+
}
|