Skip to content

Commit d656b68

Browse files
Merge branch 'feat/generate-in-public' into dev
2 parents aacc019 + 3841eec commit d656b68

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/add.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import fs from 'fs-extra';
22
import path from 'path';
33
import chalk from 'chalk';
44

5-
const BASE_DIR = path.join(process.cwd(), 'stackscan');
5+
const BASE_DIR = path.join(process.cwd(), 'public', 'stackscan');
66

77
export async function add(sourcePath: string) {
88
let absoluteSourcePath = path.resolve(sourcePath);
@@ -50,7 +50,7 @@ export async function add(sourcePath: string) {
5050
}
5151

5252
fs.copyFileSync(absoluteSourcePath, targetFile);
53-
console.log(chalk.green(`✅ Added project "${pkg.name}" to stackscan/${folderName}`));
53+
console.log(chalk.green(`✅ Added project "${pkg.name}" to public/stackscan/${folderName}`));
5454

5555
} catch (error) {
5656
console.error(chalk.red(`❌ Error processing ${sourcePath}:`), error);

src/cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ program
1414

1515
program
1616
.command("scan", { isDefault: true })
17-
.description("Scan stacks from multiple projects in stackscan/")
17+
.description("Scan stacks from multiple projects in public/stackscan/")
1818
.option("--color <mode>", "Color mode (brand, white, black, or hex)", "brand")
1919
.action(async (options) => {
2020
await scan(options);
2121
});
2222

2323
program
2424
.command("add <path>")
25-
.description("Add a project (folder or package.json) to the stackscan workspace")
25+
.description("Add a project (folder or package.json) to the public/stackscan workspace")
2626
.action(async (path) => {
2727
await add(path);
2828
});

src/scan.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { techMap } from './techMap';
44
import simpleIconsHex from './simple-icons-hex.json';
55
import { generateMarkdown, copyAssets } from './output';
66

7-
const BASE_DIR = path.join(process.cwd(), 'stackscan');
7+
const BASE_DIR = path.join(process.cwd(), 'public', 'stackscan');
88

99
const SKIPPED_TECHS = [
1010
'react-dom',
@@ -36,15 +36,15 @@ async function scan(options: SyncOptions = {}) {
3636
if (!fs.existsSync(BASE_DIR)) {
3737
console.log(`Creating stackscan directory at: ${BASE_DIR}`);
3838
fs.mkdirSync(BASE_DIR, { recursive: true });
39-
console.log('Please place your project folders inside "stackscan/" and run this command again.');
39+
console.log('Please place your project folders inside "public/stackscan/" and run this command again.');
4040
process.exit(0);
4141
}
4242

4343
const entries = fs.readdirSync(BASE_DIR, { withFileTypes: true });
4444
const projectDirs = entries.filter(dirent => dirent.isDirectory() && dirent.name !== 'input' && dirent.name !== 'output');
4545

4646
if (projectDirs.length === 0) {
47-
console.log('⚠️ No project directories found in "stackscan/".');
47+
console.log('⚠️ No project directories found in "public/stackscan/".');
4848
return;
4949
}
5050

src/sync.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { techMap } from './techMap';
44
import simpleIconsHex from './simple-icons-hex.json';
55
import { generateMarkdown, copyAssets } from './output';
66

7-
const BASE_DIR = path.join(process.cwd(), 'stackscan');
7+
const BASE_DIR = path.join(process.cwd(), 'public', 'stackscan');
88

99
const SKIPPED_TECHS = [
1010
'react-dom',
@@ -36,15 +36,15 @@ async function sync(options: SyncOptions = {}) {
3636
if (!fs.existsSync(BASE_DIR)) {
3737
console.log(`Creating stackscan directory at: ${BASE_DIR}`);
3838
fs.mkdirSync(BASE_DIR, { recursive: true });
39-
console.log('Please place your project folders inside "stackscan/" and run this command again.');
39+
console.log('Please place your project folders inside "public/stackscan/" and run this command again.');
4040
process.exit(0);
4141
}
4242

4343
const entries = fs.readdirSync(BASE_DIR, { withFileTypes: true });
4444
const projectDirs = entries.filter(dirent => dirent.isDirectory() && dirent.name !== 'input' && dirent.name !== 'output');
4545

4646
if (projectDirs.length === 0) {
47-
console.log('⚠️ No project directories found in "stackscan/".');
47+
console.log('⚠️ No project directories found in "public/stackscan/".');
4848
return;
4949
}
5050

0 commit comments

Comments
 (0)