create-dovite 1.0.2 → 1.0.4
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/LICENSE +21 -0
- package/README.md +5 -4
- package/index.js +35 -32
- package/package.json +2 -2
- package/template/src/index.css +119 -3
- /package/template/src/API/{DomoAPI.js → domoAPI.js} +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Ajay
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# create-dovite
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Vite template featuring Tailwind(v4), ShadCN, and DOMO integration.
|
|
5
4
|
|
|
6
5
|
> **Note:** This package requires yarn and the DOMO CLI to be installed before use.
|
|
7
6
|
|
|
@@ -10,10 +9,11 @@ A Vite template with Tailwind CSS(v4), shadcn/ui(canary), and DOMO integration.
|
|
|
10
9
|
```bash
|
|
11
10
|
# Install yarn if you don't have it
|
|
12
11
|
npm install -g yarn
|
|
12
|
+
```
|
|
13
13
|
|
|
14
14
|
# For DOMO CLI installation, refer to:
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
|
|
16
|
+
[DOMO CLI](https://developer.domo.com/portal/6hlzv1hinkq19-setup-and-installation)
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
19
19
|
|
|
@@ -44,4 +44,5 @@ npx create-dovite my-app
|
|
|
44
44
|
- [Vitawind](https://vitawind.vercel.app/)
|
|
45
45
|
|
|
46
46
|
## License
|
|
47
|
+
|
|
47
48
|
MIT
|
package/index.js
CHANGED
|
@@ -15,9 +15,12 @@ async function main() {
|
|
|
15
15
|
console.log(`Creating new project: ${projectName}`);
|
|
16
16
|
|
|
17
17
|
// Create Vite project
|
|
18
|
-
execSync(
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
execSync(
|
|
19
|
+
`yarn create vite ${projectName} --template react --no-interactive`,
|
|
20
|
+
{
|
|
21
|
+
stdio: "inherit",
|
|
22
|
+
}
|
|
23
|
+
);
|
|
21
24
|
|
|
22
25
|
// Move into project directory
|
|
23
26
|
process.chdir(projectName);
|
|
@@ -109,7 +112,7 @@ async function main() {
|
|
|
109
112
|
build: "vite build",
|
|
110
113
|
lint: "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
|
|
111
114
|
preview: "vite preview",
|
|
112
|
-
upload: "yarn run build && cd dist && domo publish && cd ..",
|
|
115
|
+
upload: "yarn run build && cd dist && domo publish && cd ..", //only line need to be added
|
|
113
116
|
};
|
|
114
117
|
|
|
115
118
|
fs.writeFileSync(
|
|
@@ -120,10 +123,10 @@ async function main() {
|
|
|
120
123
|
// Initialize shadcn
|
|
121
124
|
console.log("Initializing shadcn...");
|
|
122
125
|
try {
|
|
123
|
-
execSync("npx shadcn@
|
|
126
|
+
execSync("npx shadcn@latest init", { stdio: "inherit" });
|
|
124
127
|
} catch (error) {
|
|
125
128
|
console.log(
|
|
126
|
-
'Note: You may need to run "npx shadcn@
|
|
129
|
+
'Note: You may need to run "npx shadcn@latest init" manually if initialization failed.'
|
|
127
130
|
);
|
|
128
131
|
}
|
|
129
132
|
|
|
@@ -132,32 +135,32 @@ async function main() {
|
|
|
132
135
|
execSync("yarn", { stdio: "inherit" });
|
|
133
136
|
|
|
134
137
|
// Modify components.json
|
|
135
|
-
const componentsJsonPath = path.join(process.cwd(), "components.json");
|
|
136
|
-
if (fs.existsSync(componentsJsonPath)) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
} else {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
138
|
+
// const componentsJsonPath = path.join(process.cwd(), "components.json");
|
|
139
|
+
// if (fs.existsSync(componentsJsonPath)) {
|
|
140
|
+
// console.log("Updating components.json...");
|
|
141
|
+
// try {
|
|
142
|
+
// const componentsJson = JSON.parse(
|
|
143
|
+
// fs.readFileSync(componentsJsonPath, "utf8")
|
|
144
|
+
// );
|
|
145
|
+
|
|
146
|
+
// // Modify the utils path as specified
|
|
147
|
+
// if (componentsJson.aliases) {
|
|
148
|
+
// componentsJson.aliases.utils = "/src/lib/utils";
|
|
149
|
+
// }
|
|
150
|
+
|
|
151
|
+
// fs.writeFileSync(
|
|
152
|
+
// componentsJsonPath,
|
|
153
|
+
// JSON.stringify(componentsJson, null, 2)
|
|
154
|
+
// );
|
|
155
|
+
// console.log("Successfully updated components.json");
|
|
156
|
+
// } catch (error) {
|
|
157
|
+
// console.error("Error updating components.json:", error.message);
|
|
158
|
+
// }
|
|
159
|
+
// } else {
|
|
160
|
+
// console.log(
|
|
161
|
+
// "Warning: components.json not found. Make sure shadcn initialization completed successfully."
|
|
162
|
+
// );
|
|
163
|
+
// }
|
|
161
164
|
execSync("npx shadcn@latest add button", { stdio: "inherit" });
|
|
162
165
|
|
|
163
166
|
console.log("Initializing git");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-dovite",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Vite template
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "Vite template featuring Tailwind (v4), ShadCN (Canary), and DOMO integration.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"create-dovite": "index.js"
|
package/template/src/index.css
CHANGED
|
@@ -1,11 +1,87 @@
|
|
|
1
1
|
@import "tailwindcss";
|
|
2
|
-
|
|
3
|
-
@plugin "tailwindcss-animate";
|
|
2
|
+
@import "tw-animate-css";
|
|
4
3
|
|
|
5
4
|
@custom-variant dark (&:is(.dark *));
|
|
6
5
|
|
|
7
6
|
:root {
|
|
8
|
-
|
|
7
|
+
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
8
|
+
line-height: 1.5;
|
|
9
|
+
font-weight: 400;
|
|
10
|
+
|
|
11
|
+
color-scheme: light dark;
|
|
12
|
+
color: rgba(255, 255, 255, 0.87);
|
|
13
|
+
background-color: #242424;
|
|
14
|
+
|
|
15
|
+
font-synthesis: none;
|
|
16
|
+
text-rendering: optimizeLegibility;
|
|
17
|
+
-webkit-font-smoothing: antialiased;
|
|
18
|
+
-moz-osx-font-smoothing: grayscale;
|
|
19
|
+
--radius: 0.625rem;
|
|
20
|
+
--background: oklch(1 0 0);
|
|
21
|
+
--foreground: oklch(0.145 0 0);
|
|
22
|
+
--card: oklch(1 0 0);
|
|
23
|
+
--card-foreground: oklch(0.145 0 0);
|
|
24
|
+
--popover: oklch(1 0 0);
|
|
25
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
26
|
+
--primary: oklch(0.205 0 0);
|
|
27
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
28
|
+
--secondary: oklch(0.97 0 0);
|
|
29
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
30
|
+
--muted: oklch(0.97 0 0);
|
|
31
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
32
|
+
--accent: oklch(0.97 0 0);
|
|
33
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
34
|
+
--destructive: oklch(0.577 0.245 27.325);
|
|
35
|
+
--border: oklch(0.922 0 0);
|
|
36
|
+
--input: oklch(0.922 0 0);
|
|
37
|
+
--ring: oklch(0.708 0 0);
|
|
38
|
+
--chart-1: oklch(0.646 0.222 41.116);
|
|
39
|
+
--chart-2: oklch(0.6 0.118 184.704);
|
|
40
|
+
--chart-3: oklch(0.398 0.07 227.392);
|
|
41
|
+
--chart-4: oklch(0.828 0.189 84.429);
|
|
42
|
+
--chart-5: oklch(0.769 0.188 70.08);
|
|
43
|
+
--sidebar: oklch(0.985 0 0);
|
|
44
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
45
|
+
--sidebar-primary: oklch(0.205 0 0);
|
|
46
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
47
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
48
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
49
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
50
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.dark {
|
|
54
|
+
--background: oklch(0.145 0 0);
|
|
55
|
+
--foreground: oklch(0.985 0 0);
|
|
56
|
+
--card: oklch(0.205 0 0);
|
|
57
|
+
--card-foreground: oklch(0.985 0 0);
|
|
58
|
+
--popover: oklch(0.205 0 0);
|
|
59
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
60
|
+
--primary: oklch(0.922 0 0);
|
|
61
|
+
--primary-foreground: oklch(0.205 0 0);
|
|
62
|
+
--secondary: oklch(0.269 0 0);
|
|
63
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
64
|
+
--muted: oklch(0.269 0 0);
|
|
65
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
66
|
+
--accent: oklch(0.269 0 0);
|
|
67
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
68
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
69
|
+
--border: oklch(1 0 0 / 10%);
|
|
70
|
+
--input: oklch(1 0 0 / 15%);
|
|
71
|
+
--ring: oklch(0.556 0 0);
|
|
72
|
+
--chart-1: oklch(0.488 0.243 264.376);
|
|
73
|
+
--chart-2: oklch(0.696 0.17 162.48);
|
|
74
|
+
--chart-3: oklch(0.769 0.188 70.08);
|
|
75
|
+
--chart-4: oklch(0.627 0.265 303.9);
|
|
76
|
+
--chart-5: oklch(0.645 0.246 16.439);
|
|
77
|
+
--sidebar: oklch(0.205 0 0);
|
|
78
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
79
|
+
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
80
|
+
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
81
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
82
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
83
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
84
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
9
85
|
}
|
|
10
86
|
|
|
11
87
|
@theme inline {
|
|
@@ -13,4 +89,44 @@
|
|
|
13
89
|
--radius-md: calc(var(--radius) - 2px);
|
|
14
90
|
--radius-lg: var(--radius);
|
|
15
91
|
--radius-xl: calc(var(--radius) + 4px);
|
|
92
|
+
--color-background: var(--background);
|
|
93
|
+
--color-foreground: var(--foreground);
|
|
94
|
+
--color-card: var(--card);
|
|
95
|
+
--color-card-foreground: var(--card-foreground);
|
|
96
|
+
--color-popover: var(--popover);
|
|
97
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
98
|
+
--color-primary: var(--primary);
|
|
99
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
100
|
+
--color-secondary: var(--secondary);
|
|
101
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
102
|
+
--color-muted: var(--muted);
|
|
103
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
104
|
+
--color-accent: var(--accent);
|
|
105
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
106
|
+
--color-destructive: var(--destructive);
|
|
107
|
+
--color-border: var(--border);
|
|
108
|
+
--color-input: var(--input);
|
|
109
|
+
--color-ring: var(--ring);
|
|
110
|
+
--color-chart-1: var(--chart-1);
|
|
111
|
+
--color-chart-2: var(--chart-2);
|
|
112
|
+
--color-chart-3: var(--chart-3);
|
|
113
|
+
--color-chart-4: var(--chart-4);
|
|
114
|
+
--color-chart-5: var(--chart-5);
|
|
115
|
+
--color-sidebar: var(--sidebar);
|
|
116
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
117
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
118
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
119
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
120
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
121
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
122
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
16
123
|
}
|
|
124
|
+
|
|
125
|
+
@layer base {
|
|
126
|
+
* {
|
|
127
|
+
@apply border-border outline-ring/50;
|
|
128
|
+
}
|
|
129
|
+
body {
|
|
130
|
+
@apply bg-background text-foreground;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
File without changes
|