atomsystem 0.1.28 → 0.1.30
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/cli/init.js +19 -7
- package/package.json +2 -1
package/cli/init.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import inquirer from "inquirer";
|
|
3
|
+
import ora from "ora";
|
|
3
4
|
import { exec } from "child_process";
|
|
4
5
|
import fs, { copyFileSync, mkdirSync, readdirSync } from "fs";
|
|
5
6
|
import path from "path";
|
|
@@ -44,24 +45,26 @@ inquirer
|
|
|
44
45
|
])
|
|
45
46
|
.then(async (answers) => {
|
|
46
47
|
if (answers.installPackages) {
|
|
47
|
-
|
|
48
|
+
const pkgSpinner = ora("Installing Next.js and React...").start();
|
|
48
49
|
|
|
49
50
|
try {
|
|
50
51
|
await execPromise(
|
|
51
52
|
"npm install next@latest react@latest react-dom@latest tailwindcss"
|
|
52
53
|
);
|
|
53
|
-
|
|
54
|
+
pkgSpinner.succeed("Next.js and React installation complete!");
|
|
54
55
|
} catch (err) {
|
|
55
|
-
|
|
56
|
+
pkgSpinner.fail("Error during Next.js/React installation");
|
|
57
|
+
console.error(err);
|
|
56
58
|
return;
|
|
57
59
|
}
|
|
58
60
|
|
|
59
|
-
|
|
61
|
+
const sdSpinner = ora("Installing style-dictionary for atom design tokens...").start();
|
|
60
62
|
try {
|
|
61
63
|
await execPromise("npm install style-dictionary -D");
|
|
62
|
-
|
|
64
|
+
sdSpinner.succeed("style-dictionary installation complete!");
|
|
63
65
|
} catch (err) {
|
|
64
|
-
|
|
66
|
+
sdSpinner.fail("Error during style-dictionary installation");
|
|
67
|
+
console.error(err);
|
|
65
68
|
return;
|
|
66
69
|
}
|
|
67
70
|
|
|
@@ -75,6 +78,10 @@ inquirer
|
|
|
75
78
|
packageJson.type = "module";
|
|
76
79
|
packageJson.scripts = {
|
|
77
80
|
...packageJson.scripts,
|
|
81
|
+
"dev": "node build/build-tokens.js && next dev",
|
|
82
|
+
"build": "next build",
|
|
83
|
+
"start": "next start",
|
|
84
|
+
"lint": "next lint",
|
|
78
85
|
"token-build": "node build/build-tokens.js",
|
|
79
86
|
};
|
|
80
87
|
|
|
@@ -127,7 +134,7 @@ export const ThemeProvider = ({ children }: { children: React.ReactNode }) => {
|
|
|
127
134
|
{
|
|
128
135
|
path: path.join(appDir, "layout.tsx"),
|
|
129
136
|
content: `import { ThemeProvider } from "./ThemeProvider";
|
|
130
|
-
import "
|
|
137
|
+
import "./globals.css";
|
|
131
138
|
|
|
132
139
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
133
140
|
return (
|
|
@@ -140,6 +147,11 @@ export default function RootLayout({ children }: { children: React.ReactNode })
|
|
|
140
147
|
</html>
|
|
141
148
|
)
|
|
142
149
|
}`,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
path: path.join(appDir, "globals.css"),
|
|
153
|
+
content: `@import "tailwindcss";
|
|
154
|
+
@import "../build/css/_variables.css";`,
|
|
143
155
|
},
|
|
144
156
|
{
|
|
145
157
|
path: path.join(appDir, "page.tsx"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atomsystem",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"homepage": "https://system.atomground.com",
|
|
6
6
|
"bin": {
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"highlight.js": "^11.11.1",
|
|
42
42
|
"inquirer": "^12.4.2",
|
|
43
43
|
"next": "15.2.8",
|
|
44
|
+
"ora": "^9.3.0",
|
|
44
45
|
"react": "^18.0.0",
|
|
45
46
|
"react-dom": "^18.0.0",
|
|
46
47
|
"react-modal": "^3.16.3",
|