Skip to content

Commit e580cf0

Browse files
committed
chore(tooling): rename internal scripts directory
1 parent 0adf028 commit e580cf0

12 files changed

Lines changed: 34 additions & 17 deletions

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
/.pnp
44
.pnp.js
55

6-
# testing
6+
# generated reports and local captures
77
/coverage
88
/test-results/
9+
/output/
910

1011
# next.js
1112
/.next/
@@ -18,7 +19,6 @@
1819
# misc
1920
.DS_Store
2021
*.pem
21-
/output/
2222

2323
# debug
2424
npm-debug.log*

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,33 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"dev": "node internal/scripts/dev-with-agentation.mjs",
7+
"dev": "node tooling/scripts/dev-with-agentation.mjs",
88
"dev:next": "next dev --webpack",
99
"dev:agentation": "agentation-mcp server",
1010
"build": "next build --webpack",
1111
"start": "next start",
1212
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
13-
"lint:css:syntax": "node internal/scripts/check-css-syntax.mjs",
14-
"verify:docs": "node internal/scripts/verify-docs.mjs",
13+
"lint:css:syntax": "node tooling/scripts/check-css-syntax.mjs",
14+
"verify:docs": "node tooling/scripts/verify-docs.mjs",
1515
"analyze": "ANALYZE=true next build --webpack",
1616
"test": "vitest",
1717
"test:unit": "vitest run",
18-
"test:components": "vitest run src/features/**/*.test.ts src/features/**/*.test.tsx src/shared/**/*.test.ts src/shared/**/*.test.tsx",
18+
"test:components": "vitest run blog resume search shared site platform styles",
1919
"test:coverage": "vitest run --coverage",
2020
"test:ci": "npm run lint && npm run lint:css:syntax && npm run verify:docs && npm run test:unit && npm run test:e2e",
2121
"test:e2e": "npx playwright test",
22-
"test:smoke": "vitest run src/shared/**/*.test.ts src/app/actions/*.test.ts && npx playwright test --grep @smoke",
23-
"new-post": "node internal/scripts/posts/new-post.js",
24-
"content:audit": "node internal/scripts/posts/audit-post-quality.mjs",
25-
"localize:images": "node internal/scripts/posts/localize-post-images.mjs",
22+
"test:smoke": "vitest run shared/**/*.test.ts shared/**/*.test.tsx blog/api/*.test.ts && npx playwright test --grep @smoke",
23+
"new-post": "node tooling/scripts/posts/new-post.js",
24+
"content:audit": "node tooling/scripts/posts/audit-post-quality.mjs",
25+
"localize:images": "node tooling/scripts/posts/localize-post-images.mjs",
2626
"format": "prettier --write .",
27-
"lint:md": "markdownlint-cli2 --config internal/config/.markdownlint-cli2.jsonc '**/*.md' '**/*.mdx'",
28-
"lint:spell": "cspell --config internal/config/cspell.json '**/*'",
27+
"lint:md": "markdownlint-cli2 --config tooling/config/.markdownlint-cli2.jsonc '**/*.md' '**/*.mdx'",
28+
"lint:spell": "cspell --config tooling/config/cspell.json '**/*'",
2929
"prepare": "husky"
3030
},
3131
"lint-staged": {
3232
"*.{js,jsx,ts,tsx,json,css,md,mdx}": "prettier --write",
33-
"*.{md,mdx}": "markdownlint-cli2 --config internal/config/.markdownlint-cli2.jsonc"
33+
"*.{md,mdx}": "markdownlint-cli2 --config tooling/config/.markdownlint-cli2.jsonc"
3434
},
3535
"prettier": {
3636
"semi": true,
Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from 'path';
33
import postcss from 'postcss';
44

55
const ROOT = process.cwd();
6-
const TARGET_DIR = path.join(ROOT, 'src');
6+
const TARGET_DIRS = ['src', 'blog', 'search', 'shared', 'site', 'styles'];
77

88
async function collectCssFiles(dirPath) {
99
const entries = await fs.readdir(dirPath, { withFileTypes: true });
@@ -42,10 +42,27 @@ async function validateCssFile(filePath) {
4242
}
4343

4444
async function main() {
45-
const cssFiles = await collectCssFiles(TARGET_DIR);
45+
const existingTargetDirs = await Promise.all(
46+
TARGET_DIRS.map(async (targetDir) => {
47+
const fullPath = path.join(ROOT, targetDir);
48+
try {
49+
const stats = await fs.stat(fullPath);
50+
return stats.isDirectory() ? fullPath : null;
51+
} catch {
52+
return null;
53+
}
54+
})
55+
);
56+
const cssFiles = (
57+
await Promise.all(
58+
existingTargetDirs
59+
.filter((entry) => entry !== null)
60+
.map((targetDir) => collectCssFiles(targetDir))
61+
)
62+
).flat();
4663

4764
if (cssFiles.length === 0) {
48-
console.log('No CSS files found under src/.');
65+
console.log('No CSS files found under configured source directories.');
4966
return;
5067
}
5168

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)