create-workerstack 0.1.1 → 0.1.2
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/bin/index.js +4 -3
- package/package.json +1 -1
- package/template/package.json +2 -0
package/bin/index.js
CHANGED
|
@@ -789,7 +789,8 @@ var __dirname2 = path.dirname(__filename2);
|
|
|
789
789
|
async function main() {
|
|
790
790
|
console.log();
|
|
791
791
|
we(import_picocolors3.default.bgMagenta(import_picocolors3.default.white(" create-workerstack ")));
|
|
792
|
-
const
|
|
792
|
+
const argTarget = process.argv[2];
|
|
793
|
+
const argProjectName = argTarget === "." ? path.basename(path.resolve(".")) : argTarget;
|
|
793
794
|
const options = await be({
|
|
794
795
|
projectName: () => argProjectName ? Promise.resolve(argProjectName) : ue({
|
|
795
796
|
message: "Project name:",
|
|
@@ -834,7 +835,7 @@ async function main() {
|
|
|
834
835
|
const packageManager = options.packageManager;
|
|
835
836
|
const installDeps = options.installDeps;
|
|
836
837
|
const initGit = options.initGit;
|
|
837
|
-
const targetDir = path.resolve(process.cwd(), projectName);
|
|
838
|
+
const targetDir = argTarget === "." ? path.resolve(".") : path.resolve(process.cwd(), projectName);
|
|
838
839
|
if (fs.existsSync(targetDir)) {
|
|
839
840
|
const files = fs.readdirSync(targetDir);
|
|
840
841
|
if (files.length > 0) {
|
|
@@ -892,7 +893,7 @@ async function main() {
|
|
|
892
893
|
}
|
|
893
894
|
const pmRun = packageManager === "npm" ? "npm run" : packageManager;
|
|
894
895
|
ye([
|
|
895
|
-
`cd ${projectName}`,
|
|
896
|
+
argTarget === "." ? "" : `cd ${projectName}`,
|
|
896
897
|
!installDeps ? `${packageManager} install` : "",
|
|
897
898
|
"cp .env.example .env",
|
|
898
899
|
`${pmRun} dev`
|
package/package.json
CHANGED
package/template/package.json
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
"ba:schema": "bun x auth@latest generate --config better-auth.config.ts --output src/database/auth-schema.ts"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"@emotion/react": "^11.14.0",
|
|
20
|
+
"@emotion/styled": "^11.14.0",
|
|
19
21
|
"@mui/material": "^7.3.9",
|
|
20
22
|
"better-auth": "^1.5.5",
|
|
21
23
|
"drizzle-orm": "^0.45.1",
|