intentcss-cli 0.1.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/LICENSE +21 -0
- package/README.md +21 -0
- package/dist/bin/intent.d.ts +8 -0
- package/dist/bin/intent.d.ts.map +1 -0
- package/dist/bin/intent.js +55 -0
- package/dist/bin/intent.js.map +1 -0
- package/dist/commands/compile.d.ts +14 -0
- package/dist/commands/compile.d.ts.map +1 -0
- package/dist/commands/compile.js +103 -0
- package/dist/commands/compile.js.map +1 -0
- package/dist/commands/generate.d.ts +14 -0
- package/dist/commands/generate.d.ts.map +1 -0
- package/dist/commands/generate.js +127 -0
- package/dist/commands/generate.js.map +1 -0
- package/dist/commands/init.d.ts +12 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +398 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/migrate.d.ts +13 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +155 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/validate.d.ts +13 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +109 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/config.d.ts +9 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +46 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/diagnostics.d.ts +7 -0
- package/dist/utils/diagnostics.d.ts.map +1 -0
- package/dist/utils/diagnostics.js +9 -0
- package/dist/utils/diagnostics.js.map +1 -0
- package/package.json +56 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Intent Framework Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# intent-cli
|
|
2
|
+
|
|
3
|
+
CLI tools for the [Intent](https://github.com/mixedmetals/intent-framework) styling framework.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -D intent-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Commands
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
intent init # Initialize Intent in your project
|
|
15
|
+
intent compile # Compile design system to CSS
|
|
16
|
+
intent validate # Validate component usage against schema
|
|
17
|
+
intent migrate # Migrate from Tailwind (experimental)
|
|
18
|
+
intent generate # Generate AI-friendly documentation
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
See the main repo for full documentation.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent.d.ts","sourceRoot":"","sources":["../../src/bin/intent.ts"],"names":[],"mappings":";AAEA;;;;GAIG"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Intent CLI
|
|
4
|
+
*
|
|
5
|
+
* Command-line interface for the Intent styling framework.
|
|
6
|
+
*/
|
|
7
|
+
import { program } from 'commander';
|
|
8
|
+
import { compileCommand } from '../commands/compile.js';
|
|
9
|
+
import { validateCommand } from '../commands/validate.js';
|
|
10
|
+
import { initCommand } from '../commands/init.js';
|
|
11
|
+
import { migrateCommand } from '../commands/migrate.js';
|
|
12
|
+
import { generateCommand } from '../commands/generate.js';
|
|
13
|
+
program
|
|
14
|
+
.name('intent')
|
|
15
|
+
.description('Intent - Schema-first, AI-native styling framework')
|
|
16
|
+
.version('0.1.0');
|
|
17
|
+
program
|
|
18
|
+
.command('compile')
|
|
19
|
+
.description('Compile design system to CSS and TypeScript')
|
|
20
|
+
.option('-c, --config <path>', 'Path to config file', 'intent.config.ts')
|
|
21
|
+
.option('-o, --output <dir>', 'Output directory', '.intent')
|
|
22
|
+
.option('-m, --minify', 'Minify CSS output', false)
|
|
23
|
+
.option('-w, --watch', 'Watch for changes', false)
|
|
24
|
+
.action(compileCommand);
|
|
25
|
+
program
|
|
26
|
+
.command('validate')
|
|
27
|
+
.description('Validate component usage against schema')
|
|
28
|
+
.option('-c, --config <path>', 'Path to config file', 'intent.config.ts')
|
|
29
|
+
.option('-f, --fix', 'Automatically fix issues where possible', false)
|
|
30
|
+
.option('--strict', 'Fail on warnings too', false)
|
|
31
|
+
.argument('[files...]', 'Files to validate (defaults to src/**/*.{tsx,jsx})')
|
|
32
|
+
.action(validateCommand);
|
|
33
|
+
program
|
|
34
|
+
.command('init')
|
|
35
|
+
.description('Initialize Intent in your project')
|
|
36
|
+
.option('-t, --template <name>', 'Template to use', 'default')
|
|
37
|
+
.option('-f, --force', 'Overwrite existing files', false)
|
|
38
|
+
.action(initCommand);
|
|
39
|
+
program
|
|
40
|
+
.command('migrate')
|
|
41
|
+
.description('Migrate from existing styling solution')
|
|
42
|
+
.requiredOption('--from <source>', 'Source framework (tailwind, css-modules)')
|
|
43
|
+
.option('-s, --src <dir>', 'Source directory', './src')
|
|
44
|
+
.option('-d, --dry-run', 'Show what would change without modifying files', false)
|
|
45
|
+
.action(migrateCommand);
|
|
46
|
+
program
|
|
47
|
+
.command('generate')
|
|
48
|
+
.description('Generate AI-friendly documentation')
|
|
49
|
+
.option('-c, --config <path>', 'Path to config file', 'intent.config.ts')
|
|
50
|
+
.option('-o, --output <dir>', 'Output directory', '.intent')
|
|
51
|
+
.option('--component <name>', 'Generate docs for specific component')
|
|
52
|
+
.option('--prompt', 'Generate AI prompt for Cursor/Claude', false)
|
|
53
|
+
.action(generateCommand);
|
|
54
|
+
program.parse();
|
|
55
|
+
//# sourceMappingURL=intent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent.js","sourceRoot":"","sources":["../../src/bin/intent.ts"],"names":[],"mappings":";AAEA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO;KACJ,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,oDAAoD,CAAC;KACjE,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,SAAS,CAAC;KAClB,WAAW,CAAC,6CAA6C,CAAC;KA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AkB,CAAC;KACxE,MAAM,CAAC,oBAAoB,EAAE,kBAAkB,EAAE,SAAS,CAAC;KAC3D,MAAM,CAAC,oBAAoB,EAAE,sCAAsC,CAAC;KACpE,MAAM,CAAC,UAAU,EAAE,sCAAsC,EAAE,KAAK,CAAC;KACjE,MAAM,CAAC,eAAe,CAAC,CAAC;AAE3B,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compile Command
|
|
3
|
+
*
|
|
4
|
+
* Compiles the design system to CSS and TypeScript definitions.
|
|
5
|
+
*/
|
|
6
|
+
interface CompileOptions {
|
|
7
|
+
config: string;
|
|
8
|
+
output: string;
|
|
9
|
+
minify: boolean;
|
|
10
|
+
watch: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function compileCommand(options: CompileOptions): Promise<void>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=compile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/commands/compile.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,UAAU,cAAc;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CA+G3E"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compile Command
|
|
3
|
+
*
|
|
4
|
+
* Compiles the design system to CSS and TypeScript definitions.
|
|
5
|
+
*/
|
|
6
|
+
import fs from 'node:fs/promises';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import chalk from 'chalk';
|
|
9
|
+
import { compile } from 'intent-core/compiler';
|
|
10
|
+
import { loadConfig } from '../utils/config.js';
|
|
11
|
+
import { formatDiagnostics } from '../utils/diagnostics.js';
|
|
12
|
+
export async function compileCommand(options) {
|
|
13
|
+
console.log(chalk.blue('Intent'), chalk.gray('compiling design system...\n'));
|
|
14
|
+
const startTime = Date.now();
|
|
15
|
+
try {
|
|
16
|
+
// Load configuration
|
|
17
|
+
const config = await loadConfig(options.config);
|
|
18
|
+
// Compile
|
|
19
|
+
const compilerOptions = {
|
|
20
|
+
minify: options.minify,
|
|
21
|
+
outDir: options.output,
|
|
22
|
+
};
|
|
23
|
+
const result = await compile(config, compilerOptions);
|
|
24
|
+
// Ensure output directory exists
|
|
25
|
+
await fs.mkdir(options.output, { recursive: true });
|
|
26
|
+
// Write outputs
|
|
27
|
+
await Promise.all([
|
|
28
|
+
fs.writeFile(path.join(options.output, 'intent.css'), result.css),
|
|
29
|
+
fs.writeFile(path.join(options.output, 'types.d.ts'), result.types),
|
|
30
|
+
fs.writeFile(path.join(options.output, 'schema.ts'), result.runtime),
|
|
31
|
+
fs.writeFile(path.join(options.output, 'ai-manifest.json'), JSON.stringify(result.manifest, null, 2)),
|
|
32
|
+
]);
|
|
33
|
+
// Print results
|
|
34
|
+
const duration = Date.now() - startTime;
|
|
35
|
+
if (result.success) {
|
|
36
|
+
console.log(chalk.green('✓'), 'Compiled successfully in', chalk.cyan(`${duration}ms`));
|
|
37
|
+
console.log();
|
|
38
|
+
console.log('Output files:');
|
|
39
|
+
console.log(' ', chalk.gray('→'), path.join(options.output, 'intent.css'));
|
|
40
|
+
console.log(' ', chalk.gray('→'), path.join(options.output, 'types.d.ts'));
|
|
41
|
+
console.log(' ', chalk.gray('→'), path.join(options.output, 'schema.ts'));
|
|
42
|
+
console.log(' ', chalk.gray('→'), path.join(options.output, 'ai-manifest.json'));
|
|
43
|
+
if (result.warnings.length > 0) {
|
|
44
|
+
console.log();
|
|
45
|
+
console.log(chalk.yellow('Warnings:'));
|
|
46
|
+
console.log(formatDiagnostics(result.warnings));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
console.log(chalk.red('✗'), 'Compilation failed');
|
|
51
|
+
console.log();
|
|
52
|
+
console.log(chalk.red('Errors:'));
|
|
53
|
+
console.log(formatDiagnostics(result.errors));
|
|
54
|
+
if (result.warnings.length > 0) {
|
|
55
|
+
console.log();
|
|
56
|
+
console.log(chalk.yellow('Warnings:'));
|
|
57
|
+
console.log(formatDiagnostics(result.warnings));
|
|
58
|
+
}
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
|
61
|
+
// Watch mode
|
|
62
|
+
if (options.watch) {
|
|
63
|
+
const { watch } = await import('chokidar');
|
|
64
|
+
console.log();
|
|
65
|
+
console.log(chalk.gray('Watching for changes...'));
|
|
66
|
+
const watcher = watch(options.config, { ignoreInitial: true });
|
|
67
|
+
watcher.on('change', async () => {
|
|
68
|
+
console.log();
|
|
69
|
+
console.log(chalk.gray('Config changed, recompiling...'));
|
|
70
|
+
try {
|
|
71
|
+
const newConfig = await loadConfig(options.config);
|
|
72
|
+
const newResult = await compile(newConfig, compilerOptions);
|
|
73
|
+
await Promise.all([
|
|
74
|
+
fs.writeFile(path.join(options.output, 'intent.css'), newResult.css),
|
|
75
|
+
fs.writeFile(path.join(options.output, 'types.d.ts'), newResult.types),
|
|
76
|
+
fs.writeFile(path.join(options.output, 'schema.ts'), newResult.runtime),
|
|
77
|
+
fs.writeFile(path.join(options.output, 'ai-manifest.json'), JSON.stringify(newResult.manifest, null, 2)),
|
|
78
|
+
]);
|
|
79
|
+
if (newResult.success) {
|
|
80
|
+
console.log(chalk.green('✓'), 'Recompiled successfully');
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
console.log(chalk.red('✗'), 'Recompilation failed');
|
|
84
|
+
console.log(formatDiagnostics(newResult.errors));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
console.error(chalk.red('Error:'), error);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
// Keep process alive
|
|
92
|
+
process.on('SIGINT', () => {
|
|
93
|
+
watcher.close();
|
|
94
|
+
process.exit(0);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
console.error(chalk.red('Error:'), error instanceof Error ? error.message : error);
|
|
100
|
+
process.exit(1);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=compile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../../src/commands/compile.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAwB,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAS5D,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAAuB;IAC1D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;IAE9E,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,IAAI,CAAC;QACH,qBAAqB;QACrB,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAEhD,UAAU;QACV,MAAM,eAAe,GAAoB;YACvC,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;QAEtD,iCAAiC;QACjC,MAAM,EAAE,CAAC,KAAK,CAAC,OAAO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Command
|
|
3
|
+
*
|
|
4
|
+
* Generates AI-friendly documentation and prompts.
|
|
5
|
+
*/
|
|
6
|
+
interface GenerateOptions {
|
|
7
|
+
config: string;
|
|
8
|
+
output: string;
|
|
9
|
+
component?: string;
|
|
10
|
+
prompt: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function generateCommand(options: GenerateOptions): Promise<void>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,UAAU,eAAe;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAmE7E"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate Command
|
|
3
|
+
*
|
|
4
|
+
* Generates AI-friendly documentation and prompts.
|
|
5
|
+
*/
|
|
6
|
+
import fs from 'node:fs/promises';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import chalk from 'chalk';
|
|
9
|
+
import { generateAIManifest, generateAIPrompt } from 'intent-core';
|
|
10
|
+
import { loadConfig } from '../utils/config.js';
|
|
11
|
+
export async function generateCommand(options) {
|
|
12
|
+
console.log(chalk.blue('Intent'), chalk.gray('generating documentation...\n'));
|
|
13
|
+
try {
|
|
14
|
+
const config = await loadConfig(options.config);
|
|
15
|
+
const manifest = generateAIManifest(config);
|
|
16
|
+
await fs.mkdir(options.output, { recursive: true });
|
|
17
|
+
if (options.prompt) {
|
|
18
|
+
// Generate AI prompt for Cursor/Claude
|
|
19
|
+
const prompt = generateAIPrompt(manifest, {
|
|
20
|
+
component: options.component,
|
|
21
|
+
});
|
|
22
|
+
const outputPath = path.join(options.output, 'ai-prompt.md');
|
|
23
|
+
await fs.writeFile(outputPath, prompt);
|
|
24
|
+
console.log(chalk.green('✓'), 'Generated AI prompt:', chalk.cyan(outputPath));
|
|
25
|
+
console.log();
|
|
26
|
+
console.log(chalk.gray('Copy this file to your .cursorrules or paste into Claude:'));
|
|
27
|
+
console.log(chalk.cyan(` cat ${outputPath} | pbcopy`));
|
|
28
|
+
}
|
|
29
|
+
else if (options.component) {
|
|
30
|
+
// Generate docs for specific component
|
|
31
|
+
const component = manifest.components.find(c => c.name === options.component);
|
|
32
|
+
if (!component) {
|
|
33
|
+
console.log(chalk.red('Error:'), `Component "${options.component}" not found`);
|
|
34
|
+
console.log();
|
|
35
|
+
console.log('Available components:');
|
|
36
|
+
for (const c of manifest.components) {
|
|
37
|
+
console.log(` - ${chalk.cyan(c.name)}`);
|
|
38
|
+
}
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
const docs = generateComponentDocs(component);
|
|
42
|
+
const outputPath = path.join(options.output, `${options.component.toLowerCase()}.md`);
|
|
43
|
+
await fs.writeFile(outputPath, docs);
|
|
44
|
+
console.log(chalk.green('✓'), 'Generated component docs:', chalk.cyan(outputPath));
|
|
45
|
+
console.log();
|
|
46
|
+
console.log(docs);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
// Generate full manifest
|
|
50
|
+
const outputPath = path.join(options.output, 'ai-manifest.json');
|
|
51
|
+
await fs.writeFile(outputPath, JSON.stringify(manifest, null, 2));
|
|
52
|
+
console.log(chalk.green('✓'), 'Generated AI manifest:', chalk.cyan(outputPath));
|
|
53
|
+
console.log();
|
|
54
|
+
console.log('Components:');
|
|
55
|
+
for (const component of manifest.components) {
|
|
56
|
+
console.log(` ${chalk.cyan(component.name)}: ${component.description.slice(0, 60)}...`);
|
|
57
|
+
}
|
|
58
|
+
// Also generate prompt
|
|
59
|
+
const promptPath = path.join(options.output, 'ai-prompt.md');
|
|
60
|
+
await fs.writeFile(promptPath, generateAIPrompt(manifest));
|
|
61
|
+
console.log();
|
|
62
|
+
console.log(chalk.green('✓'), 'Generated AI prompt:', chalk.cyan(promptPath));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
console.error(chalk.red('Error:'), error instanceof Error ? error.message : error);
|
|
67
|
+
process.exit(1);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function generateComponentDocs(component) {
|
|
71
|
+
const lines = [];
|
|
72
|
+
lines.push(`# ${component.name}`);
|
|
73
|
+
lines.push('');
|
|
74
|
+
lines.push(component.description);
|
|
75
|
+
lines.push('');
|
|
76
|
+
lines.push('## Properties');
|
|
77
|
+
lines.push('');
|
|
78
|
+
for (const prop of component.properties) {
|
|
79
|
+
lines.push(`### \`${prop.name}\``);
|
|
80
|
+
lines.push('');
|
|
81
|
+
lines.push(`- **Type:** ${prop.type}`);
|
|
82
|
+
if (prop.values) {
|
|
83
|
+
lines.push(`- **Values:** ${prop.values.map(v => `\`${v}\``).join(', ')}`);
|
|
84
|
+
}
|
|
85
|
+
lines.push(`- **Required:** ${prop.required ? 'Yes' : 'No'}`);
|
|
86
|
+
if (prop.default !== undefined) {
|
|
87
|
+
lines.push(`- **Default:** \`${JSON.stringify(prop.default)}\``);
|
|
88
|
+
}
|
|
89
|
+
if (prop.description) {
|
|
90
|
+
lines.push(`- **Description:** ${prop.description}`);
|
|
91
|
+
}
|
|
92
|
+
lines.push('');
|
|
93
|
+
}
|
|
94
|
+
if (component.constraints.length > 0) {
|
|
95
|
+
lines.push('## Constraints');
|
|
96
|
+
lines.push('');
|
|
97
|
+
for (const constraint of component.constraints) {
|
|
98
|
+
lines.push(`- ${constraint}`);
|
|
99
|
+
}
|
|
100
|
+
lines.push('');
|
|
101
|
+
}
|
|
102
|
+
lines.push('## Examples');
|
|
103
|
+
lines.push('');
|
|
104
|
+
lines.push('### Valid Usage');
|
|
105
|
+
lines.push('');
|
|
106
|
+
for (const example of component.examples.valid) {
|
|
107
|
+
lines.push('```tsx');
|
|
108
|
+
lines.push(example);
|
|
109
|
+
lines.push('```');
|
|
110
|
+
lines.push('');
|
|
111
|
+
}
|
|
112
|
+
if (component.examples.invalid.length > 0) {
|
|
113
|
+
lines.push('### Invalid Usage (Avoid These)');
|
|
114
|
+
lines.push('');
|
|
115
|
+
for (const example of component.examples.invalid) {
|
|
116
|
+
lines.push('```tsx');
|
|
117
|
+
lines.push(example);
|
|
118
|
+
lines.push('```');
|
|
119
|
+
lines.push('');
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
lines.push('---');
|
|
123
|
+
lines.push('');
|
|
124
|
+
lines.push('*Generated by Intent CLI*');
|
|
125
|
+
return lines.join('\n');
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=generate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAShD,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,OAAwB;IAC5D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC,CAAC;IAE/E,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAChD,MAAM,QAAQ,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;QAE5C,MAAM,EAAE,CAAC,KAAK,CAAC,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@
|
|
|
1
|
+
/**
|
|
2
|
+
* Init Command
|
|
3
|
+
*
|
|
4
|
+
* Initializes Intent in a new or existing project.
|
|
5
|
+
*/
|
|
6
|
+
interface InitOptions {
|
|
7
|
+
template: string;
|
|
8
|
+
force: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function initCommand(options: InitOptions): Promise<void>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,UAAU,WAAW;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;CAChB;AAwTD,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAqFrE"}
|