Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 2a4a2d7

Browse files
committed
feat(typedcssx.mjs): Integrate compilation and type checking
1 parent 86364ab commit 2a4a2d7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

bin/typedcssx.mjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#!/usr/bin/env node
22

33
import { execSync } from 'child_process';
4-
import { fileURLToPath } from 'url';
5-
import { join, dirname } from 'path';
6-
7-
const __filename = fileURLToPath(import.meta.url);
8-
const __dirname = dirname(__filename);
4+
import { join } from 'path';
95

106
if (process.argv.includes('--compile')) {
117
try {
128
console.log('Running TypeScript compiler...');
13-
execSync('npm run compiler', {
9+
execSync('npx tsc --noEmit --incremental false', {
10+
stdio: 'inherit',
11+
cwd: process.cwd(),
12+
});
13+
execSync('npx tsx compiler/src/index.ts', {
1414
stdio: 'inherit',
15-
cwd: join(__dirname, '../../typedcssx'),
15+
cwd: join(process.cwd(), 'node_modules/typedcssx'),
1616
});
1717

1818
console.log('Compilation completed successfully.');

0 commit comments

Comments
 (0)