@springmicro/cli 0.1.3 → 0.1.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 +3 -3
- package/dist/commands/init/astro.js +6 -1
- package/dist/scripts/astro.bat +30 -0
- package/dist/scripts/astro.sh +8 -0
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ $ npm install -g @springmicro/cli
|
|
|
27
27
|
$ springmicro COMMAND
|
|
28
28
|
running command...
|
|
29
29
|
$ springmicro (--version)
|
|
30
|
-
@springmicro/cli/0.1.
|
|
30
|
+
@springmicro/cli/0.1.5 win32-x64 node-v18.17.1
|
|
31
31
|
$ springmicro --help [COMMAND]
|
|
32
32
|
USAGE
|
|
33
33
|
$ springmicro COMMAND
|
|
@@ -121,7 +121,7 @@ EXAMPLES
|
|
|
121
121
|
$ springmicro init astro -n example
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
_See code: [src/commands/init/index.ts](https://github.com/SpringMicro1/springmicrohost-js/blob/v0.1.
|
|
124
|
+
_See code: [src/commands/init/index.ts](https://github.com/SpringMicro1/springmicrohost-js/blob/v0.1.5/src/commands/init/index.ts)_
|
|
125
125
|
|
|
126
126
|
## `springmicro init astro`
|
|
127
127
|
|
|
@@ -141,7 +141,7 @@ EXAMPLES
|
|
|
141
141
|
$ springmicro init astro -n <project-name>
|
|
142
142
|
```
|
|
143
143
|
|
|
144
|
-
_See code: [src/commands/init/astro.ts](https://github.com/SpringMicro1/springmicrohost-js/blob/v0.1.
|
|
144
|
+
_See code: [src/commands/init/astro.ts](https://github.com/SpringMicro1/springmicrohost-js/blob/v0.1.5/src/commands/init/astro.ts)_
|
|
145
145
|
|
|
146
146
|
## `springmicro plugins`
|
|
147
147
|
|
|
@@ -5,6 +5,7 @@ import path from 'node:path';
|
|
|
5
5
|
import { tailwindConfigMjs, globalsCSS, libUtils, componentsJSON } from '../../data/astro/index.js';
|
|
6
6
|
import chalk from 'chalk';
|
|
7
7
|
import { logStep } from '../../log/index.js';
|
|
8
|
+
import os from 'os';
|
|
8
9
|
export default class Astro extends Command {
|
|
9
10
|
static step = 1;
|
|
10
11
|
static totalSteps = 2;
|
|
@@ -26,7 +27,11 @@ export default class Astro extends Command {
|
|
|
26
27
|
this.exit(1);
|
|
27
28
|
}
|
|
28
29
|
logStep('Initializing Astro project...', Astro.step, Astro.totalSteps);
|
|
29
|
-
const
|
|
30
|
+
const isWindows = os.platform() === 'win32';
|
|
31
|
+
const astroCmd = isWindows
|
|
32
|
+
? `./${path.join('scripts', 'astro.bat')} ${name}`
|
|
33
|
+
: `sh ${path.join('scripts', 'astro.sh')} ${name}`;
|
|
34
|
+
const astroPS = spawn(astroCmd, {
|
|
30
35
|
stdio: 'inherit', // This ensures the child process's stdio is piped directly to the parent process's stdio
|
|
31
36
|
});
|
|
32
37
|
astroPS.on('close', (code) => {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
setlocal
|
|
3
|
+
|
|
4
|
+
:: Check if a project name was provided
|
|
5
|
+
if "%~1"=="" (
|
|
6
|
+
echo Usage: %0 projectName
|
|
7
|
+
exit /b 1
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
set projectName=%~1
|
|
11
|
+
|
|
12
|
+
:: Create a new Astro project with the specified template and options
|
|
13
|
+
pnpm create astro %projectName% -- --template blog --install --typescript relaxed --git -y
|
|
14
|
+
if errorlevel 1 exit /b %errorlevel%
|
|
15
|
+
|
|
16
|
+
cd %projectName%
|
|
17
|
+
|
|
18
|
+
:: Add React to the Astro project
|
|
19
|
+
pnpx astro add react -y
|
|
20
|
+
if errorlevel 1 exit /b %errorlevel%
|
|
21
|
+
|
|
22
|
+
:: Add Tailwind CSS to the Astro project
|
|
23
|
+
pnpx astro add tailwind -y
|
|
24
|
+
if errorlevel 1 exit /b %errorlevel%
|
|
25
|
+
|
|
26
|
+
:: Install additional packages for shadcn-ui
|
|
27
|
+
pnpm install tailwindcss-animate class-variance-authority clsx tailwind-merge lucide-react
|
|
28
|
+
if errorlevel 1 exit /b %errorlevel%
|
|
29
|
+
|
|
30
|
+
endlocal
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
projectName=$1
|
|
2
|
+
pnpm create astro $projectName -- --template blog --install --typescript relaxed --git -y
|
|
3
|
+
cd $projectName
|
|
4
|
+
pnpx astro add react -y
|
|
5
|
+
pnpx astro add tailwind -y
|
|
6
|
+
# shadcn-ui
|
|
7
|
+
# https://ui.shadcn.com/docs/installation/manual
|
|
8
|
+
pnpm install tailwindcss-animate class-variance-authority clsx tailwind-merge lucide-react
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@springmicro/cli",
|
|
3
3
|
"description": "A new CLI generated with oclif",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.5",
|
|
5
5
|
"author": "David Buckley",
|
|
6
6
|
"private": false,
|
|
7
7
|
"publishConfig": {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"repository": "SpringMicro1/springmicrohost-js",
|
|
69
69
|
"scripts": {
|
|
70
|
-
"build": "shx rm -rf dist && tsc -b",
|
|
70
|
+
"build": "shx rm -rf dist && tsc -b && cp -rf scripts dist",
|
|
71
71
|
"lint": "eslint . --ext .ts",
|
|
72
72
|
"postpack": "shx rm -f oclif.manifest.json",
|
|
73
73
|
"posttest": "pnpm run lint",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"version": "oclif readme && git add README.md"
|
|
77
77
|
},
|
|
78
78
|
"types": "dist/index.d.ts",
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "287dda2e6436b80194c425ee7637c6604779aece"
|
|
80
80
|
}
|