create-stk 0.0.3 → 0.0.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/dist/index.cjs CHANGED
@@ -95,7 +95,7 @@ function parseCliArgs(argv) {
95
95
  let parsed = null;
96
96
  const { project, normalizedArgv } = detectPositionalProject(argv);
97
97
  const managers = SUPPORTED_PACKAGES.map((p) => p.pkName);
98
- program.name("create-stk").description("Opinionated, unified project scaffolding CLI.").argument("[directory]", "Where your project will be stored").option("-p, --project <type>", `Project type: ${PROJECT_TYPES.join(" | ")}`).option("--pm <manager>", `Package manager: ${managers.join(" | ")}`).option("--git", "Initialize git repository").option("--no-git", "Skip git initialization").option("--skip-install", "Skip dependency installation").option("--dry-run", "Print the plan without creating files");
98
+ program.name("create-stk").description("Opinionated, unified project scaffolding CLI.").argument("[directory]", "Where your project will be stored").option("-p, --project <type>", `Project type: ${PROJECT_TYPES.join(" | ")} (auto-selects defaults)`).option("--pm <manager>", `Package manager: ${managers.join(" | ")} (defaults to detected when project is provided)`).option("--git", "Initialize git repository (default when project is provided)").option("--no-git", "Skip git initialization (overrides default)").option("--skip-install", "Skip dependency installation").option("--dry-run", "Print the plan without creating files");
99
99
  program.action((directory, options, command) => {
100
100
  const projectOption = options.project;
101
101
  const packageManager = options.pm;
@@ -151,6 +151,8 @@ async function resolvePlan(cli) {
151
151
  let packageManager;
152
152
  if (cli.packageManager) {
153
153
  packageManager = cli.packageManager;
154
+ } else if (project) {
155
+ packageManager = pkName;
154
156
  } else {
155
157
  const selections = await (0, import_prompts.group)(
156
158
  {
@@ -176,6 +178,8 @@ async function resolvePlan(cli) {
176
178
  let git;
177
179
  if (typeof cli.git === "boolean") {
178
180
  git = cli.git;
181
+ } else if (project) {
182
+ git = true;
179
183
  } else {
180
184
  const gitChoice = await (0, import_prompts.confirm)({
181
185
  message: "Do you want to initialize a git repo?"
@@ -269,7 +273,7 @@ var getNodePackage = (dirName) => `{
269
273
  "name": "${dirName}",
270
274
  "version": "1.0.0",
271
275
  "scripts": {
272
- "dev": "tsx index.mt"
276
+ "dev": "tsx index.ts"
273
277
  },
274
278
  "dependencies": {},
275
279
  "devDependencies": {}
package/dist/index.js CHANGED
@@ -72,7 +72,7 @@ function parseCliArgs(argv) {
72
72
  let parsed = null;
73
73
  const { project, normalizedArgv } = detectPositionalProject(argv);
74
74
  const managers = SUPPORTED_PACKAGES.map((p) => p.pkName);
75
- program.name("create-stk").description("Opinionated, unified project scaffolding CLI.").argument("[directory]", "Where your project will be stored").option("-p, --project <type>", `Project type: ${PROJECT_TYPES.join(" | ")}`).option("--pm <manager>", `Package manager: ${managers.join(" | ")}`).option("--git", "Initialize git repository").option("--no-git", "Skip git initialization").option("--skip-install", "Skip dependency installation").option("--dry-run", "Print the plan without creating files");
75
+ program.name("create-stk").description("Opinionated, unified project scaffolding CLI.").argument("[directory]", "Where your project will be stored").option("-p, --project <type>", `Project type: ${PROJECT_TYPES.join(" | ")} (auto-selects defaults)`).option("--pm <manager>", `Package manager: ${managers.join(" | ")} (defaults to detected when project is provided)`).option("--git", "Initialize git repository (default when project is provided)").option("--no-git", "Skip git initialization (overrides default)").option("--skip-install", "Skip dependency installation").option("--dry-run", "Print the plan without creating files");
76
76
  program.action((directory, options, command) => {
77
77
  const projectOption = options.project;
78
78
  const packageManager = options.pm;
@@ -128,6 +128,8 @@ async function resolvePlan(cli) {
128
128
  let packageManager;
129
129
  if (cli.packageManager) {
130
130
  packageManager = cli.packageManager;
131
+ } else if (project) {
132
+ packageManager = pkName;
131
133
  } else {
132
134
  const selections = await group(
133
135
  {
@@ -153,6 +155,8 @@ async function resolvePlan(cli) {
153
155
  let git;
154
156
  if (typeof cli.git === "boolean") {
155
157
  git = cli.git;
158
+ } else if (project) {
159
+ git = true;
156
160
  } else {
157
161
  const gitChoice = await confirm({
158
162
  message: "Do you want to initialize a git repo?"
@@ -245,7 +249,7 @@ var getNodePackage = (dirName) => `{
245
249
  "name": "${dirName}",
246
250
  "version": "1.0.0",
247
251
  "scripts": {
248
- "dev": "tsx index.mt"
252
+ "dev": "tsx index.ts"
249
253
  },
250
254
  "dependencies": {},
251
255
  "devDependencies": {}
package/dist/src/cli.js CHANGED
@@ -52,10 +52,10 @@ export function parseCliArgs(argv) {
52
52
  .name('create-stk')
53
53
  .description('Opinionated, unified project scaffolding CLI.')
54
54
  .argument('[directory]', 'Where your project will be stored')
55
- .option('-p, --project <type>', `Project type: ${PROJECT_TYPES.join(' | ')}`)
56
- .option('--pm <manager>', `Package manager: ${managers.join(' | ')}`)
57
- .option('--git', 'Initialize git repository')
58
- .option('--no-git', 'Skip git initialization')
55
+ .option('-p, --project <type>', `Project type: ${PROJECT_TYPES.join(' | ')} (auto-selects defaults)`)
56
+ .option('--pm <manager>', `Package manager: ${managers.join(' | ')} (defaults to detected when project is provided)`)
57
+ .option('--git', 'Initialize git repository (default when project is provided)')
58
+ .option('--no-git', 'Skip git initialization (overrides default)')
59
59
  .option('--skip-install', 'Skip dependency installation')
60
60
  .option('--dry-run', 'Print the plan without creating files');
61
61
  program.action((directory, options, command) => {
@@ -116,6 +116,9 @@ export async function resolvePlan(cli) {
116
116
  if (cli.packageManager) {
117
117
  packageManager = cli.packageManager;
118
118
  }
119
+ else if (project) {
120
+ packageManager = pkName;
121
+ }
119
122
  else {
120
123
  const selections = await group({
121
124
  packageManager: () => select({
@@ -139,6 +142,9 @@ export async function resolvePlan(cli) {
139
142
  if (typeof cli.git === 'boolean') {
140
143
  git = cli.git;
141
144
  }
145
+ else if (project) {
146
+ git = true;
147
+ }
142
148
  else {
143
149
  const gitChoice = await confirm({
144
150
  message: 'Do you want to initialize a git repo?',
@@ -82,7 +82,7 @@ export const getNodePackage = (dirName) => `{
82
82
  "name": "${dirName}",
83
83
  "version": "1.0.0",
84
84
  "scripts": {
85
- "dev": "tsx index.mt"
85
+ "dev": "tsx index.ts"
86
86
  },
87
87
  "dependencies": {},
88
88
  "devDependencies": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-stk",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "Opinionated, unified project scaffolding CLI.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",