create-minions-bundle 1.0.0
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 +16 -0
- package/package.json +41 -0
- package/src/bundle-codegen.js +259 -0
- package/src/generator.js +107 -0
- package/src/github.js +110 -0
- package/src/index.js +144 -0
- package/src/manual.js +171 -0
- package/src/prompts.js +128 -0
- package/src/template.js +62 -0
- package/templates/apps/blog/astro.config.mjs +25 -0
- package/templates/apps/blog/netlify.toml +3 -0
- package/templates/apps/blog/package.json +34 -0
- package/templates/apps/blog/public/favicon.svg +4 -0
- package/templates/apps/blog/src/layouts/BaseLayout.astro +39 -0
- package/templates/apps/blog/src/pages/index.astro +18 -0
- package/templates/apps/blog/src/pages/posts/welcome.md +23 -0
- package/templates/apps/blog/src/styles/global.css.template +6 -0
- package/templates/apps/blog/tsconfig.json +11 -0
- package/templates/apps/docs/astro.config.mjs +42 -0
- package/templates/apps/docs/netlify.toml +4 -0
- package/templates/apps/docs/package.json +21 -0
- package/templates/apps/docs/src/content/docs/api/python.md +24 -0
- package/templates/apps/docs/src/content/docs/api/typescript.md +24 -0
- package/templates/apps/docs/src/content/docs/getting-started/installation.md +27 -0
- package/templates/apps/docs/src/content/docs/getting-started/introduction.md +22 -0
- package/templates/apps/docs/src/content/docs/getting-started/quick-start.md +28 -0
- package/templates/apps/docs/src/content/docs/index.mdx.template +24 -0
- package/templates/apps/docs/src/styles/custom.css.template +14 -0
- package/templates/apps/docs/tsconfig.json +3 -0
- package/templates/apps/web/index.html +17 -0
- package/templates/apps/web/netlify.toml +6 -0
- package/templates/apps/web/package.json +34 -0
- package/templates/apps/web/postcss.config.js +5 -0
- package/templates/apps/web/public/favicon.svg +4 -0
- package/templates/apps/web/src/App.css +111 -0
- package/templates/apps/web/src/App.tsx +46 -0
- package/templates/apps/web/src/index.css.template +12 -0
- package/templates/apps/web/src/main.tsx +10 -0
- package/templates/apps/web/tsconfig.json +36 -0
- package/templates/apps/web/tsconfig.node.json +13 -0
- package/templates/apps/web/vite.config.ts +21 -0
- package/templates/github/CODE_OF_CONDUCT.md +5 -0
- package/templates/github/CONTRIBUTING.md +49 -0
- package/templates/github/FUNDING.yml +2 -0
- package/templates/github/FUNDING.yml.template +1 -0
- package/templates/github/ISSUE_TEMPLATE/bug_report.md +20 -0
- package/templates/github/ISSUE_TEMPLATE/feature_request.md +18 -0
- package/templates/github/workflows/ci.yml +65 -0
- package/templates/github/workflows/publish.yml +81 -0
- package/templates/github/workflows/release.yml +16 -0
- package/templates/packages/cli/README.md +19 -0
- package/templates/packages/cli/package.json +38 -0
- package/templates/packages/cli/src/index.ts +353 -0
- package/templates/packages/cli/tsconfig.json +23 -0
- package/templates/packages/python/README.md +21 -0
- package/templates/packages/python/__pythonModule__/__init__.py +24 -0
- package/templates/packages/python/__pythonModule__/schemas.py.template +8 -0
- package/templates/packages/python/pyproject.toml +34 -0
- package/templates/packages/python/tests/test_basic.py +20 -0
- package/templates/packages/sdk/README.md.template +25 -0
- package/templates/packages/sdk/package.json.template +43 -0
- package/templates/packages/sdk/src/__tests__/bundle.test.ts.template +18 -0
- package/templates/packages/sdk/src/bundle.ts.template +6 -0
- package/templates/packages/sdk/src/index.ts.template +13 -0
- package/templates/packages/sdk/src/relations.ts.template +6 -0
- package/templates/packages/sdk/src/views.ts.template +6 -0
- package/templates/packages/sdk/tsconfig.json +26 -0
- package/templates/root/.release-please-manifest.json +3 -0
- package/templates/root/CHANGELOG.md +15 -0
- package/templates/root/CHANGELOG.md.template +10 -0
- package/templates/root/LICENSE.template +21 -0
- package/templates/root/README.md.template +42 -0
- package/templates/root/SECURITY.md +35 -0
- package/templates/root/SECURITY.md.template +11 -0
- package/templates/root/SKILLS.md.template +10 -0
- package/templates/root/package.json.template +28 -0
- package/templates/root/pnpm-workspace.yaml +4 -0
- package/templates/root/release-please-config.json +61 -0
- package/templates/root/tsconfig.json +31 -0
package/src/manual.js
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate the MANUAL.md content with project-specific values.
|
|
3
|
+
* @param {object} config - Project configuration
|
|
4
|
+
* @returns {string}
|
|
5
|
+
*/
|
|
6
|
+
export function generateManual(config) {
|
|
7
|
+
return `# Manual Setup Steps for ${config.projectCapitalized}
|
|
8
|
+
|
|
9
|
+
This document lists the steps that must be completed manually after scaffolding.
|
|
10
|
+
Each step includes specific values for your project.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. GitHub Repository Secrets
|
|
15
|
+
|
|
16
|
+
Go to **GitHub → ${config.githubOrg}/${config.projectName} → Settings → Secrets and variables → Actions** and add:
|
|
17
|
+
|
|
18
|
+
| Secret | Description | Where to get it |
|
|
19
|
+
|--------|-------------|-----------------|
|
|
20
|
+
| \`NPM_TOKEN\` | npm publish token | [npmjs.com → Access Tokens](https://www.npmjs.com/settings/~/tokens) |
|
|
21
|
+
| \`PYPI_TOKEN\` | PyPI API token for \`${config.pythonPackage}\` | [pypi.org → Account Settings → API tokens](https://pypi.org/manage/account/#api-tokens) |
|
|
22
|
+
|
|
23
|
+
> **Note**: If you share tokens across repos, you can use GitHub Organization secrets instead.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 2. Netlify Sites
|
|
28
|
+
|
|
29
|
+
Create **3 Netlify sites** — one for each app:
|
|
30
|
+
|
|
31
|
+
### Web App (Playground)
|
|
32
|
+
- **Netlify site name**: \`${config.projectName}-web\`
|
|
33
|
+
- **GitHub repo**: \`${config.githubOrg}/${config.projectName}\`
|
|
34
|
+
- **Base directory**: \`apps/web\`
|
|
35
|
+
- **Build command**: \`pnpm run build\`
|
|
36
|
+
- **Publish directory**: \`apps/web/dist\`
|
|
37
|
+
- **Custom domain**: \`${config.domainApp}\`
|
|
38
|
+
|
|
39
|
+
### Documentation
|
|
40
|
+
- **Netlify site name**: \`${config.projectName}-docs\`
|
|
41
|
+
- **GitHub repo**: \`${config.githubOrg}/${config.projectName}\`
|
|
42
|
+
- **Base directory**: \`apps/docs\`
|
|
43
|
+
- **Build command**: \`pnpm run build\`
|
|
44
|
+
- **Publish directory**: \`apps/docs/dist\`
|
|
45
|
+
- **Custom domain**: \`${config.domainHelp}\`
|
|
46
|
+
|
|
47
|
+
### Blog
|
|
48
|
+
- **Netlify site name**: \`${config.projectName}-blog\`
|
|
49
|
+
- **GitHub repo**: \`${config.githubOrg}/${config.projectName}\`
|
|
50
|
+
- **Base directory**: \`apps/blog\`
|
|
51
|
+
- **Build command**: \`pnpm run build\`
|
|
52
|
+
- **Publish directory**: \`apps/blog/dist\`
|
|
53
|
+
- **Custom domain**: \`${config.domainBlog}\`
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 3. DNS Configuration
|
|
58
|
+
|
|
59
|
+
Add CNAME records at your DNS provider:
|
|
60
|
+
|
|
61
|
+
| Record | Type | Name | Value |
|
|
62
|
+
|--------|------|------|-------|
|
|
63
|
+
| Docs | CNAME | \`${config.projectSlug}.minions.help\` | _(Netlify subdomain)_ |
|
|
64
|
+
| Blog | CNAME | \`${config.projectSlug}.minions.blog\` | _(Netlify subdomain)_ |
|
|
65
|
+
| App | CNAME | \`${config.projectSlug}.minions.wtf\` | _(Netlify subdomain)_ |
|
|
66
|
+
|
|
67
|
+
> Get the Netlify subdomain from Netlify → Site settings → Domain management
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 4. npm Packages — First Publish
|
|
72
|
+
|
|
73
|
+
Before the CI publish workflow works, you need to publish initial versions manually:
|
|
74
|
+
|
|
75
|
+
\`\`\`bash
|
|
76
|
+
# From the project root
|
|
77
|
+
pnpm install
|
|
78
|
+
pnpm run build
|
|
79
|
+
|
|
80
|
+
# Publish SDK
|
|
81
|
+
cd packages/sdk
|
|
82
|
+
npm publish --access public
|
|
83
|
+
cd ../..
|
|
84
|
+
|
|
85
|
+
# Publish CLI
|
|
86
|
+
cd packages/cli
|
|
87
|
+
npm publish --access public
|
|
88
|
+
cd ../..
|
|
89
|
+
\`\`\`
|
|
90
|
+
|
|
91
|
+
Your packages:
|
|
92
|
+
- SDK: [\`${config.sdkName}\`](https://www.npmjs.com/package/${config.sdkName})
|
|
93
|
+
- CLI: [\`${config.cliName}\`](https://www.npmjs.com/package/${config.cliName})
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 5. PyPI Package — First Publish
|
|
98
|
+
|
|
99
|
+
\`\`\`bash
|
|
100
|
+
cd packages/python
|
|
101
|
+
|
|
102
|
+
# Create virtual env
|
|
103
|
+
python -m venv .venv
|
|
104
|
+
source .venv/bin/activate
|
|
105
|
+
|
|
106
|
+
# Install build tools
|
|
107
|
+
pip install hatch twine
|
|
108
|
+
|
|
109
|
+
# Build
|
|
110
|
+
hatch build
|
|
111
|
+
|
|
112
|
+
# Upload (you'll be prompted for your PyPI token)
|
|
113
|
+
twine upload dist/*
|
|
114
|
+
\`\`\`
|
|
115
|
+
|
|
116
|
+
Your package: [\`${config.pythonPackage}\`](https://pypi.org/project/${config.pythonPackage}/)
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 6. Release Please
|
|
121
|
+
|
|
122
|
+
Release Please is pre-configured. After your first merge to \`main\`:
|
|
123
|
+
|
|
124
|
+
1. A "Release PR" will be auto-created
|
|
125
|
+
2. Merging the Release PR creates a GitHub Release + git tag
|
|
126
|
+
3. The \`publish.yml\` workflow triggers on tags to publish to npm/PyPI
|
|
127
|
+
|
|
128
|
+
Verify config:
|
|
129
|
+
- [\`release-please-config.json\`](./release-please-config.json)
|
|
130
|
+
- [\`.release-please-manifest.json\`](./.release-please-manifest.json)
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 7. Branch Protection
|
|
135
|
+
|
|
136
|
+
Go to **GitHub → Settings → Branches → Add rule**:
|
|
137
|
+
|
|
138
|
+
- **Branch name pattern**: \`main\`
|
|
139
|
+
- ✅ Require pull request reviews before merging
|
|
140
|
+
- ✅ Require status checks to pass (select: \`build-and-test\`, \`python-sdk\`)
|
|
141
|
+
- ✅ Require branches to be up to date
|
|
142
|
+
- ❌ Do not allow force pushes
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## 8. Add to Minions Ecosystem
|
|
147
|
+
|
|
148
|
+
Update the main [minions.dev](https://minions.dev) website to include this project:
|
|
149
|
+
|
|
150
|
+
1. Add to the plugins/projects listing page
|
|
151
|
+
2. Add the project color to \`color_tracking.md\`
|
|
152
|
+
3. Link documentation from the main docs
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Quick Reference
|
|
157
|
+
|
|
158
|
+
| Item | Value |
|
|
159
|
+
|------|-------|
|
|
160
|
+
| Project | \`${config.projectName}\` |
|
|
161
|
+
| SDK (npm) | \`${config.sdkName}\` |
|
|
162
|
+
| CLI (npm) | \`${config.cliName}\` |
|
|
163
|
+
| Python (PyPI) | \`${config.pythonPackage}\` |
|
|
164
|
+
| GitHub | \`github.com/${config.githubRepo}\` |
|
|
165
|
+
| Docs domain | \`${config.domainHelp}\` |
|
|
166
|
+
| Blog domain | \`${config.domainBlog}\` |
|
|
167
|
+
| App domain | \`${config.domainApp}\` |
|
|
168
|
+
| Author | ${config.authorName} <${config.authorEmail}> |
|
|
169
|
+
| License | ${config.license} |
|
|
170
|
+
`;
|
|
171
|
+
}
|
package/src/prompts.js
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import inquirer from 'inquirer';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Run interactive prompts to collect project configuration.
|
|
6
|
+
* Pre-fills with any values already provided via TOML or CLI flags.
|
|
7
|
+
*/
|
|
8
|
+
export async function runInteractivePrompts(tomlData = null, options = {}) {
|
|
9
|
+
const answers = await inquirer.prompt([
|
|
10
|
+
{
|
|
11
|
+
type: 'input',
|
|
12
|
+
name: 'projectName',
|
|
13
|
+
message: 'Project name:',
|
|
14
|
+
default: (tomlData && tomlData.name) ? tomlData.name : 'minions-bundles-example',
|
|
15
|
+
validate: (input) => {
|
|
16
|
+
if (!/^minions-bundles-[a-z0-9-]+$/.test(input)) {
|
|
17
|
+
return 'Must start with "minions-bundles-" followed by lowercase letters/numbers/hyphens';
|
|
18
|
+
}
|
|
19
|
+
return true;
|
|
20
|
+
},
|
|
21
|
+
when: !(tomlData && tomlData.name),
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
type: 'input',
|
|
25
|
+
name: 'projectDescription',
|
|
26
|
+
message: 'Short description:',
|
|
27
|
+
default: (ans) => {
|
|
28
|
+
const name = (tomlData && tomlData.name) ? tomlData.name : ans.projectName;
|
|
29
|
+
const slug = name.replace(/^minions-bundles-/, '');
|
|
30
|
+
return `A curated Minions ecosystem bundle for ${slug}`;
|
|
31
|
+
},
|
|
32
|
+
when: !(tomlData && tomlData.description) && !options.description,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: 'input',
|
|
36
|
+
name: 'authorName',
|
|
37
|
+
message: 'Author name:',
|
|
38
|
+
default: options.author || 'Mehdi Nabhani',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: 'input',
|
|
42
|
+
name: 'authorEmail',
|
|
43
|
+
message: 'Author email:',
|
|
44
|
+
default: options.email || 'mehdi@the-mehdi.com',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: 'input',
|
|
48
|
+
name: 'githubOrg',
|
|
49
|
+
message: 'GitHub org/user:',
|
|
50
|
+
default: (tomlData && tomlData.org) ? tomlData.org : (options.org || 'mxn2020'),
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: 'list',
|
|
54
|
+
name: 'license',
|
|
55
|
+
message: 'License:',
|
|
56
|
+
choices: ['MIT', 'Apache-2.0', 'AGPL-3.0'],
|
|
57
|
+
default: options.license || 'MIT',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
type: 'input',
|
|
61
|
+
name: 'keywords',
|
|
62
|
+
message: 'Keywords (comma-separated):',
|
|
63
|
+
default: (ans) => {
|
|
64
|
+
const name = (tomlData && tomlData.name) ? tomlData.name : ans.projectName;
|
|
65
|
+
const slug = name.replace(/^minions-bundles-/, '');
|
|
66
|
+
return `${slug}, bundle, ai, minions`;
|
|
67
|
+
},
|
|
68
|
+
filter: (input) => input.split(',').map((k) => k.trim()).filter(Boolean),
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: 'confirm',
|
|
72
|
+
name: 'setupGitHub',
|
|
73
|
+
message: 'Setup GitHub repository? (requires gh CLI)',
|
|
74
|
+
default: false,
|
|
75
|
+
when: options.github === undefined,
|
|
76
|
+
},
|
|
77
|
+
]);
|
|
78
|
+
|
|
79
|
+
const name = (tomlData && tomlData.name) ? tomlData.name : answers.projectName;
|
|
80
|
+
const slug = name.replace(/^minions-bundles-/, '');
|
|
81
|
+
const capitalizedSlug = slug.charAt(0).toUpperCase() + slug.slice(1);
|
|
82
|
+
|
|
83
|
+
const config = {
|
|
84
|
+
projectName: name,
|
|
85
|
+
projectSlug: slug,
|
|
86
|
+
projectCapitalized: `Minions Bundle: ${capitalizedSlug}`,
|
|
87
|
+
projectDescription: (tomlData && tomlData.description) ? tomlData.description : (options.description || answers.projectDescription),
|
|
88
|
+
authorName: answers.authorName || options.author || 'Mehdi Nabhani',
|
|
89
|
+
authorEmail: answers.authorEmail || options.email || 'mehdi@the-mehdi.com',
|
|
90
|
+
authorUrl: 'https://the-mehdi.com',
|
|
91
|
+
githubOrg: answers.githubOrg || options.org || 'mxn2020',
|
|
92
|
+
githubRepo: `${answers.githubOrg || options.org || 'mxn2020'}/${name}`,
|
|
93
|
+
license: answers.license || options.license || 'MIT',
|
|
94
|
+
keywords: answers.keywords || [slug, 'bundle', 'ai', 'minions'],
|
|
95
|
+
year: new Date().getFullYear().toString(),
|
|
96
|
+
accentColor: (tomlData && tomlData.colors && tomlData.colors.accent) ? tomlData.colors.accent : (options.accent || '#8B5CF6'),
|
|
97
|
+
accentHoverColor: (tomlData && tomlData.colors && tomlData.colors['accent-hover']) ? tomlData.colors['accent-hover'] : (options.accentHover || '#7C3AED'),
|
|
98
|
+
setupGitHub: answers.setupGitHub || options.github || false,
|
|
99
|
+
dryRun: options.dryRun || false,
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// Confirmation
|
|
103
|
+
console.log('');
|
|
104
|
+
console.log(chalk.bold(' 📦 Bundle Configuration:'));
|
|
105
|
+
console.log(chalk.dim(' ─────────────────────────────────────'));
|
|
106
|
+
console.log(` Name: ${chalk.cyan(config.projectName)}`);
|
|
107
|
+
console.log(` Description: ${config.projectDescription}`);
|
|
108
|
+
console.log(` GitHub: ${chalk.blue(`github.com/${config.githubRepo}`)}`);
|
|
109
|
+
console.log(` License: ${config.license}`);
|
|
110
|
+
console.log(` GitHub setup: ${config.setupGitHub ? chalk.green('Yes') : chalk.dim('No')}`);
|
|
111
|
+
console.log('');
|
|
112
|
+
|
|
113
|
+
const { confirmed } = await inquirer.prompt([
|
|
114
|
+
{
|
|
115
|
+
type: 'confirm',
|
|
116
|
+
name: 'confirmed',
|
|
117
|
+
message: 'Proceed with these settings?',
|
|
118
|
+
default: true,
|
|
119
|
+
},
|
|
120
|
+
]);
|
|
121
|
+
|
|
122
|
+
if (!confirmed) {
|
|
123
|
+
console.log(chalk.yellow('\n Aborted.\n'));
|
|
124
|
+
process.exit(0);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return config;
|
|
128
|
+
}
|
package/src/template.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Replace all {{variable}} placeholders in a string.
|
|
3
|
+
* @param {string} content - Template string
|
|
4
|
+
* @param {Record<string, string|string[]>} variables - Values to substitute
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
|
+
export function render(content, variables) {
|
|
8
|
+
return content.replace(/\{\{\s*(\w+)\s*\}\}/g, (match, key) => {
|
|
9
|
+
if (key in variables) {
|
|
10
|
+
const val = variables[key];
|
|
11
|
+
return String(val);
|
|
12
|
+
}
|
|
13
|
+
return match; // leave unresolved placeholders as-is
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
import { generateBundleCode } from './bundle-codegen.js';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Build the flat variables map from a config object.
|
|
21
|
+
* @param {object} config
|
|
22
|
+
* @returns {Record<string, string>}
|
|
23
|
+
*/
|
|
24
|
+
export function buildVariables(config) {
|
|
25
|
+
const { bundleTypesCode, relationsCode, viewsCode, skillsCode, dependenciesJson, pythonSchemas, bundleTestsCode } = generateBundleCode(config);
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
projectName: config.projectName,
|
|
29
|
+
projectSlug: config.projectSlug,
|
|
30
|
+
projectCapitalized: config.projectCapitalized,
|
|
31
|
+
cliCommand: config.projectName,
|
|
32
|
+
sdkName: `@${config.projectName}/sdk`,
|
|
33
|
+
cliName: `@${config.projectName}/cli`,
|
|
34
|
+
docsName: `${config.projectName}-docs`,
|
|
35
|
+
blogName: `${config.projectName}-blog`,
|
|
36
|
+
webName: `${config.projectName}-web`,
|
|
37
|
+
pythonModule: config.projectName.replace(/-/g, '_'),
|
|
38
|
+
pythonPackage: config.projectName,
|
|
39
|
+
domainHelp: 'docs.minions.wtf',
|
|
40
|
+
domainApp: 'app.minions.wtf',
|
|
41
|
+
domainBlog: 'blog.minions.wtf',
|
|
42
|
+
projectDescription: config.projectDescription,
|
|
43
|
+
authorName: config.authorName,
|
|
44
|
+
authorEmail: config.authorEmail,
|
|
45
|
+
authorUrl: config.authorUrl,
|
|
46
|
+
githubOrg: config.githubOrg,
|
|
47
|
+
githubRepo: config.githubRepo,
|
|
48
|
+
license: config.license,
|
|
49
|
+
keywords: config.keywords.join(', '),
|
|
50
|
+
keywordsJson: JSON.stringify(config.keywords),
|
|
51
|
+
year: config.year,
|
|
52
|
+
bundleTypesCode,
|
|
53
|
+
relationsCode,
|
|
54
|
+
viewsCode,
|
|
55
|
+
skillsCode,
|
|
56
|
+
dependenciesJson,
|
|
57
|
+
accentColor: config.accentColor,
|
|
58
|
+
accentHoverColor: config.accentHoverColor,
|
|
59
|
+
pythonSchemas,
|
|
60
|
+
bundleTestsCode,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineConfig } from 'astro/config';
|
|
2
|
+
import mdx from '@astrojs/mdx';
|
|
3
|
+
import sitemap from '@astrojs/sitemap';
|
|
4
|
+
import tailwindcss from '@tailwindcss/postcss';
|
|
5
|
+
import react from '@astrojs/react';
|
|
6
|
+
|
|
7
|
+
const isProd = process.env.BRANCH === 'main';
|
|
8
|
+
const isDev = process.env.BRANCH === 'dev';
|
|
9
|
+
const siteUrl = isProd ? 'https://{{domainBlog}}' : (isDev ? 'https://{{domainBlog}}' : 'http://localhost:4321');
|
|
10
|
+
|
|
11
|
+
export default defineConfig({
|
|
12
|
+
site: siteUrl,
|
|
13
|
+
integrations: [
|
|
14
|
+
react(),
|
|
15
|
+
mdx(),
|
|
16
|
+
sitemap()
|
|
17
|
+
],
|
|
18
|
+
vite: {
|
|
19
|
+
css: {
|
|
20
|
+
postcss: {
|
|
21
|
+
plugins: [tailwindcss()],
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{blogName}}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "{{license}}",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=18"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "astro dev",
|
|
12
|
+
"build": "astro build && npx pagefind --site dist",
|
|
13
|
+
"preview": "astro preview"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@astrojs/mdx": "^4.0.8",
|
|
17
|
+
"@astrojs/react": "^4.4.2",
|
|
18
|
+
"@astrojs/rss": "^4.0.11",
|
|
19
|
+
"@astrojs/sitemap": "^3.2.1",
|
|
20
|
+
"@types/react": "^19.2.14",
|
|
21
|
+
"@types/react-dom": "^19.2.3",
|
|
22
|
+
"astro": "^5.17.3",
|
|
23
|
+
"lucide-react": "^0.575.0",
|
|
24
|
+
"react": "^19.2.4",
|
|
25
|
+
"react-dom": "^19.2.4"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@tailwindcss/postcss": "^4.2.0",
|
|
29
|
+
"pagefind": "^1.4.0",
|
|
30
|
+
"tailwindcss": "^4.2.0",
|
|
31
|
+
"typescript": "^5.9.3",
|
|
32
|
+
"zod": "^3.24.2"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
import '@/styles/global.css';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { title, description } = Astro.props;
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<!DOCTYPE html>
|
|
13
|
+
<html lang="en">
|
|
14
|
+
<head>
|
|
15
|
+
<meta charset="UTF-8" />
|
|
16
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
17
|
+
<title>{title} | {{projectCapitalized}} Blog</title>
|
|
18
|
+
<meta name="description" content={description} />
|
|
19
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
20
|
+
</head>
|
|
21
|
+
<body class="bg-gray-950 text-gray-100 min-h-screen font-sans">
|
|
22
|
+
<header class="border-b border-gray-800 px-6 py-4">
|
|
23
|
+
<nav class="max-w-4xl mx-auto flex items-center justify-between">
|
|
24
|
+
<a href="/" class="text-xl font-bold text-purple-400">{{projectCapitalized}} Blog</a>
|
|
25
|
+
<div class="flex gap-4 text-sm text-gray-400">
|
|
26
|
+
<a href="https://{{domainHelp}}" class="hover:text-white">Docs</a>
|
|
27
|
+
<a href="https://{{domainApp}}" class="hover:text-white">App</a>
|
|
28
|
+
<a href="https://github.com/{{githubRepo}}" class="hover:text-white">GitHub</a>
|
|
29
|
+
</div>
|
|
30
|
+
</nav>
|
|
31
|
+
</header>
|
|
32
|
+
<main class="max-w-4xl mx-auto px-6 py-12">
|
|
33
|
+
<slot />
|
|
34
|
+
</main>
|
|
35
|
+
<footer class="border-t border-gray-800 px-6 py-8 text-center text-gray-500 text-sm">
|
|
36
|
+
<p>© {new Date().getFullYear()} {{authorName}}. Built with Astro.</p>
|
|
37
|
+
</footer>
|
|
38
|
+
</body>
|
|
39
|
+
</html>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
import BaseLayout from '@/layouts/BaseLayout.astro';
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<BaseLayout title="Home" description="{{projectCapitalized}} Blog — Updates, tutorials, and announcements">
|
|
6
|
+
<h1 class="text-4xl font-bold mb-4">{{projectCapitalized}} Blog</h1>
|
|
7
|
+
<p class="text-gray-400 text-lg mb-8">Updates, tutorials, and announcements.</p>
|
|
8
|
+
|
|
9
|
+
<div class="space-y-8">
|
|
10
|
+
<article class="border border-gray-800 rounded-lg p-6 hover:border-purple-500 transition-colors">
|
|
11
|
+
<h2 class="text-xl font-semibold mb-2">
|
|
12
|
+
<a href="/posts/welcome" class="hover:text-purple-400">Welcome to {{projectCapitalized}}</a>
|
|
13
|
+
</h2>
|
|
14
|
+
<p class="text-gray-400">Introducing our new project in the Minions ecosystem.</p>
|
|
15
|
+
<time class="text-gray-500 text-sm mt-2 block">{{year}}</time>
|
|
16
|
+
</article>
|
|
17
|
+
</div>
|
|
18
|
+
</BaseLayout>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: ../../layouts/BaseLayout.astro
|
|
3
|
+
title: Welcome
|
|
4
|
+
description: "Introducing {{projectCapitalized}}"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Welcome to {{projectCapitalized}}
|
|
8
|
+
|
|
9
|
+
We're excited to introduce **{{projectCapitalized}}** — {{projectDescription}}.
|
|
10
|
+
|
|
11
|
+
## What's Included
|
|
12
|
+
|
|
13
|
+
- **TypeScript SDK**: `npm install {{sdkName}}`
|
|
14
|
+
- **Python SDK**: `pip install {{pythonPackage}}`
|
|
15
|
+
- **CLI**: `npm install -g {{cliName}}`
|
|
16
|
+
|
|
17
|
+
## Getting Started
|
|
18
|
+
|
|
19
|
+
Check out the [documentation](https://{{domainHelp}}) for a full guide.
|
|
20
|
+
|
|
21
|
+
## What's Next
|
|
22
|
+
|
|
23
|
+
Stay tuned for more updates, tutorials, and deep dives into the architecture.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { defineConfig } from 'astro/config';
|
|
2
|
+
import starlight from '@astrojs/starlight';
|
|
3
|
+
|
|
4
|
+
const isProd = process.env.BRANCH === 'main';
|
|
5
|
+
const isDev = process.env.BRANCH === 'dev';
|
|
6
|
+
const siteUrl = isProd ? 'https://{{domainHelp}}' : (isDev ? 'https://{{domainHelp}}' : 'http://localhost:4321');
|
|
7
|
+
|
|
8
|
+
export default defineConfig({
|
|
9
|
+
site: siteUrl,
|
|
10
|
+
integrations: [
|
|
11
|
+
starlight({
|
|
12
|
+
customCss: ['./src/styles/custom.css'],
|
|
13
|
+
title: '{{projectCapitalized}}',
|
|
14
|
+
description: '{{projectDescription}}',
|
|
15
|
+
defaultLocale: 'root',
|
|
16
|
+
locales: {
|
|
17
|
+
root: { label: 'English', lang: 'en' },
|
|
18
|
+
},
|
|
19
|
+
social: [
|
|
20
|
+
{ icon: 'github', label: 'GitHub', href: 'https://github.com/{{githubRepo}}' },
|
|
21
|
+
{ icon: 'external', label: 'App', href: 'https://{{domainApp}}' },
|
|
22
|
+
],
|
|
23
|
+
sidebar: [
|
|
24
|
+
{
|
|
25
|
+
label: 'Getting Started',
|
|
26
|
+
items: [
|
|
27
|
+
{ label: 'Introduction', link: '/getting-started/introduction/' },
|
|
28
|
+
{ label: 'Installation', link: '/getting-started/installation/' },
|
|
29
|
+
{ label: 'Quick Start', link: '/getting-started/quick-start/' },
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: 'API Reference',
|
|
34
|
+
items: [
|
|
35
|
+
{ label: 'TypeScript', link: '/api/typescript/' },
|
|
36
|
+
{ label: 'Python', link: '/api/python/' },
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
}),
|
|
41
|
+
],
|
|
42
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{docsName}}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "astro dev",
|
|
8
|
+
"build": "astro build && npx pagefind --site dist",
|
|
9
|
+
"preview": "astro preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@astrojs/starlight": "^0.37.6",
|
|
13
|
+
"astro": "^5.17.3",
|
|
14
|
+
"sharp": "^0.34.5"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"pagefind": "^1.4.0",
|
|
18
|
+
"typescript": "^5.9.3"
|
|
19
|
+
},
|
|
20
|
+
"license": "{{license}}"
|
|
21
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Python API
|
|
3
|
+
description: "Python API reference for {{pythonPackage}}"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## `create_client(**kwargs)`
|
|
7
|
+
|
|
8
|
+
Create a new client instance.
|
|
9
|
+
|
|
10
|
+
```python
|
|
11
|
+
from {{pythonModule}} import create_client
|
|
12
|
+
|
|
13
|
+
client = create_client(debug=True)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Parameters
|
|
17
|
+
|
|
18
|
+
| Parameter | Type | Default | Description |
|
|
19
|
+
|-----------|------|---------|-------------|
|
|
20
|
+
| `**kwargs` | `Any` | — | Configuration options passed as keyword arguments |
|
|
21
|
+
|
|
22
|
+
### Returns
|
|
23
|
+
|
|
24
|
+
A dictionary with the `version` key and any provided options.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: TypeScript API
|
|
3
|
+
description: "TypeScript API reference for {{sdkName}}"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## `createClient(options?)`
|
|
7
|
+
|
|
8
|
+
Create a new client instance.
|
|
9
|
+
|
|
10
|
+
```typescript
|
|
11
|
+
import { createClient } from '{{sdkName}}';
|
|
12
|
+
|
|
13
|
+
const client = createClient({ debug: true });
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Parameters
|
|
17
|
+
|
|
18
|
+
| Parameter | Type | Default | Description |
|
|
19
|
+
|-----------|------|---------|-------------|
|
|
20
|
+
| `options` | `object` | `{}` | Configuration options |
|
|
21
|
+
|
|
22
|
+
### Returns
|
|
23
|
+
|
|
24
|
+
A client object with the `version` property and any provided options.
|