@jml6m/skeletor 0.1.0-alpha.5 → 0.1.0-alpha.6
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 -2
- package/package.json +15 -2
- package/src/index.js +24 -11
- package/templates/csharp/.gitignore.tmpl +16 -0
- package/templates/csharp/Project.csproj.tmpl +17 -17
- package/templates/go/.gitignore.tmpl +24 -0
- package/templates/java/.gitignore.tmpl +16 -0
- package/templates/javascript/.gitignore.tmpl +31 -0
- package/templates/python/.gitignore.tmpl +27 -0
- package/templates/rust/.gitignore.tmpl +14 -0
- package/templates/rust/Cargo.toml.tmpl +1 -0
- package/templates/typescript/.gitignore.tmpl +31 -0
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ We use `@clack/prompts` for a modern experience:
|
|
|
29
29
|
- Confirmation step
|
|
30
30
|
- Proper cancel handling and nice spinners/intro/outro
|
|
31
31
|
|
|
32
|
-
`--auto` stays fully non-interactive for scripts (requires `--template
|
|
32
|
+
`--auto` stays fully non-interactive for scripts (requires `--template`). Pass `--owner` / `--description` on the CLI when scaffolding non-interactively.
|
|
33
33
|
|
|
34
34
|
## Pushing to GitHub
|
|
35
35
|
|
|
@@ -50,11 +50,12 @@ node src/index.js new my-project
|
|
|
50
50
|
node src/index.js new my-api --template typescript
|
|
51
51
|
|
|
52
52
|
# Non-interactive (scripts)
|
|
53
|
-
npx @jml6m/skeletor new my-service --auto --template go
|
|
53
|
+
npx @jml6m/skeletor new my-service --auto --template go --owner jml6m --description "My service"
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
Common flags:
|
|
57
57
|
- `--template <id>` (javascript, typescript, python, go, rust, java, csharp, ...)
|
|
58
|
+
- `--owner <user>` / `--description <text>` (for `--auto`, or as interactive defaults)
|
|
58
59
|
- `--auto` (skip all prompts; requires `--template`)
|
|
59
60
|
- `--no-git` (skip git init; git is on by default)
|
|
60
61
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jml6m/skeletor",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.6",
|
|
4
4
|
"description": "Efficient scaffolding for custom development. Generates projects wired with personal lint/format/health/release/alias/AGENTS.md conventions.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -10,7 +10,20 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js",
|
|
12
12
|
"test:watch": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --watch",
|
|
13
|
-
"
|
|
13
|
+
"lint": "npm run lint:encoding",
|
|
14
|
+
"lint:encoding": "node scripts/check-encoding.mjs",
|
|
15
|
+
"audit:ci": "node scripts/audit-ci.mjs",
|
|
16
|
+
"npm:reinstall": "node scripts/reinstall.mjs",
|
|
17
|
+
"git:pull": "node scripts/git-pull-all.mjs",
|
|
18
|
+
"release:patch": "npm version patch && git push --follow-tags",
|
|
19
|
+
"release:minor": "npm version minor && git push --follow-tags",
|
|
20
|
+
"release:major": "npm version major && git push --follow-tags",
|
|
21
|
+
"release:alpha": "npm version prerelease --preid=alpha && git push --follow-tags",
|
|
22
|
+
"publish:dry": "npm publish --dry-run",
|
|
23
|
+
"prepublishOnly": "npm run lint && npm run audit:ci && npm test"
|
|
24
|
+
},
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
14
27
|
},
|
|
15
28
|
"repository": {
|
|
16
29
|
"type": "git",
|
package/src/index.js
CHANGED
|
@@ -26,14 +26,16 @@ Usage:
|
|
|
26
26
|
Options:
|
|
27
27
|
--template <name> Stack to scaffold (javascript, typescript, python, go, …)
|
|
28
28
|
Omit for an interactive language/stack picker (TTY required)
|
|
29
|
-
--
|
|
30
|
-
|
|
29
|
+
--owner <user> GitHub owner/org (default: jml6m; used with --auto or as
|
|
30
|
+
interactive defaults)
|
|
31
|
+
--description <text> Project description (default: generic skeletor blurb)
|
|
32
|
+
--auto Non-interactive; requires --template
|
|
31
33
|
--no-git Skip git init (git is initialized by default)
|
|
32
34
|
|
|
33
35
|
Examples:
|
|
34
36
|
skeletor new my-api # interactive: pick stack, owner, description
|
|
35
37
|
skeletor new my-api --template typescript
|
|
36
|
-
skeletor new my-lib --auto --template go
|
|
38
|
+
skeletor new my-lib --auto --template go --owner jml6m --description "My CLI tool"
|
|
37
39
|
skeletor new my-lib --auto --template go --no-git
|
|
38
40
|
`;
|
|
39
41
|
|
|
@@ -47,6 +49,8 @@ function parseArgs(argv) {
|
|
|
47
49
|
command: null,
|
|
48
50
|
name: null,
|
|
49
51
|
template: null, // resolved later, can be interactive
|
|
52
|
+
owner: null,
|
|
53
|
+
description: null,
|
|
50
54
|
auto: false,
|
|
51
55
|
git: true,
|
|
52
56
|
};
|
|
@@ -62,6 +66,8 @@ function parseArgs(argv) {
|
|
|
62
66
|
for (let i = 2; i < args.length; i++) {
|
|
63
67
|
const a = args[i];
|
|
64
68
|
if (a === '--template' || a === '-t') result.template = args[++i] || null;
|
|
69
|
+
else if (a === '--owner' || a === '-o') result.owner = args[++i] || null;
|
|
70
|
+
else if (a === '--description' || a === '-d') result.description = args[++i] || null;
|
|
65
71
|
else if (a === '--auto') result.auto = true;
|
|
66
72
|
else if (a === '--no-git') result.git = false;
|
|
67
73
|
else if (!a.startsWith('-') && !result.name) result.name = a;
|
|
@@ -101,6 +107,7 @@ function buildRenderVars({ name, owner, description }) {
|
|
|
101
107
|
NAMESPACE: namespace,
|
|
102
108
|
GROUP_ID: `io.github.${ownerSegment}`,
|
|
103
109
|
GO_MODULE: `github.com/${repoOwner}/${name}`,
|
|
110
|
+
REPO_URL: `https://github.com/${repoOwner}/${name}`,
|
|
104
111
|
};
|
|
105
112
|
}
|
|
106
113
|
|
|
@@ -209,8 +216,8 @@ async function runNew(opts) {
|
|
|
209
216
|
}
|
|
210
217
|
|
|
211
218
|
let chosenTemplateId = opts.template;
|
|
212
|
-
let finalOwner = DEFAULT_OWNER;
|
|
213
|
-
let finalDesc = DEFAULT_DESCRIPTION;
|
|
219
|
+
let finalOwner = opts.owner || DEFAULT_OWNER;
|
|
220
|
+
let finalDesc = opts.description || DEFAULT_DESCRIPTION;
|
|
214
221
|
|
|
215
222
|
const isInteractive = !auto && process.stdout.isTTY;
|
|
216
223
|
|
|
@@ -293,12 +300,17 @@ async function runNew(opts) {
|
|
|
293
300
|
|
|
294
301
|
p.outro('✅ Done!');
|
|
295
302
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
console.log(
|
|
303
|
+
printPostScaffoldSteps(name, templateInfo.verifyCommands);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/** Print cd + full verifyCommands list after scaffolding. */
|
|
307
|
+
function printPostScaffoldSteps(projectName, verifyCommands) {
|
|
308
|
+
console.log(` cd ${projectName}`);
|
|
309
|
+
const steps = Array.isArray(verifyCommands) && verifyCommands.length
|
|
310
|
+
? verifyCommands
|
|
311
|
+
: ['Run your language-specific install + test commands'];
|
|
312
|
+
console.log(' Next steps:');
|
|
313
|
+
steps.forEach((cmd) => console.log(` ${cmd}`));
|
|
302
314
|
console.log('\n Edit AGENTS.md (or equivalent) to customize the AI contract.');
|
|
303
315
|
console.log(' Happy scaffolding. Your rules, your choice of stack.\n');
|
|
304
316
|
}
|
|
@@ -338,6 +350,7 @@ export {
|
|
|
338
350
|
ensureDir,
|
|
339
351
|
copyAndRender,
|
|
340
352
|
runNew,
|
|
353
|
+
printPostScaffoldSteps,
|
|
341
354
|
USAGE,
|
|
342
355
|
};
|
|
343
356
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<Project Sdk="Microsoft.NET.Sdk">
|
|
2
|
-
|
|
3
|
-
<PropertyGroup>
|
|
4
|
-
<OutputType>Exe</OutputType>
|
|
5
|
-
<TargetFramework>net8.0</TargetFramework>
|
|
6
|
-
<ImplicitUsings>enable</ImplicitUsings>
|
|
7
|
-
<Nullable>enable</Nullable>
|
|
8
|
-
<RootNamespace>{{NAMESPACE}}</RootNamespace>
|
|
9
|
-
</PropertyGroup>
|
|
10
|
-
|
|
11
|
-
<ItemGroup>
|
|
12
|
-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
|
13
|
-
<PackageReference Include="xunit" Version="2.6.6" />
|
|
14
|
-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6" />
|
|
15
|
-
</ItemGroup>
|
|
16
|
-
|
|
17
|
-
</Project>
|
|
1
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
|
2
|
+
|
|
3
|
+
<PropertyGroup>
|
|
4
|
+
<OutputType>Exe</OutputType>
|
|
5
|
+
<TargetFramework>net8.0</TargetFramework>
|
|
6
|
+
<ImplicitUsings>enable</ImplicitUsings>
|
|
7
|
+
<Nullable>enable</Nullable>
|
|
8
|
+
<RootNamespace>{{NAMESPACE}}</RootNamespace>
|
|
9
|
+
</PropertyGroup>
|
|
10
|
+
|
|
11
|
+
<ItemGroup>
|
|
12
|
+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
|
13
|
+
<PackageReference Include="xunit" Version="2.6.6" />
|
|
14
|
+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6" />
|
|
15
|
+
</ItemGroup>
|
|
16
|
+
|
|
17
|
+
</Project>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
|
|
4
|
+
# Build / output
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
coverage/
|
|
8
|
+
report/
|
|
9
|
+
reports/
|
|
10
|
+
|
|
11
|
+
# Env & secrets
|
|
12
|
+
.env
|
|
13
|
+
.env.*
|
|
14
|
+
*.local
|
|
15
|
+
|
|
16
|
+
# Logs
|
|
17
|
+
*.log
|
|
18
|
+
logs/
|
|
19
|
+
|
|
20
|
+
# OS / editor
|
|
21
|
+
.DS_Store
|
|
22
|
+
Thumbs.db
|
|
23
|
+
.idea/
|
|
24
|
+
.vscode/
|
|
25
|
+
*.swp
|
|
26
|
+
|
|
27
|
+
# Lockfiles that may be noisy in some flows (keep package-lock.json in real projects)
|
|
28
|
+
# package-lock.json
|
|
29
|
+
|
|
30
|
+
# Generated context for AI
|
|
31
|
+
prompt.md
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Bytecode / cache
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.pyo
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
.mypy_cache/
|
|
7
|
+
.ruff_cache/
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv/
|
|
11
|
+
venv/
|
|
12
|
+
env/
|
|
13
|
+
|
|
14
|
+
# Build / packaging
|
|
15
|
+
dist/
|
|
16
|
+
build/
|
|
17
|
+
*.egg-info/
|
|
18
|
+
|
|
19
|
+
# Env & secrets
|
|
20
|
+
.env
|
|
21
|
+
.env.*
|
|
22
|
+
|
|
23
|
+
# OS / editor
|
|
24
|
+
.DS_Store
|
|
25
|
+
Thumbs.db
|
|
26
|
+
.idea/
|
|
27
|
+
.vscode/
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
|
|
4
|
+
# Build / output
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
coverage/
|
|
8
|
+
report/
|
|
9
|
+
reports/
|
|
10
|
+
|
|
11
|
+
# Env & secrets
|
|
12
|
+
.env
|
|
13
|
+
.env.*
|
|
14
|
+
*.local
|
|
15
|
+
|
|
16
|
+
# Logs
|
|
17
|
+
*.log
|
|
18
|
+
logs/
|
|
19
|
+
|
|
20
|
+
# OS / editor
|
|
21
|
+
.DS_Store
|
|
22
|
+
Thumbs.db
|
|
23
|
+
.idea/
|
|
24
|
+
.vscode/
|
|
25
|
+
*.swp
|
|
26
|
+
|
|
27
|
+
# Lockfiles that may be noisy in some flows (keep package-lock.json in real projects)
|
|
28
|
+
# package-lock.json
|
|
29
|
+
|
|
30
|
+
# Generated context for AI
|
|
31
|
+
prompt.md
|