mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 02:15:36 +00:00
fix(tsconfig): remove duplicate compiler options
- Remove duplicate allowSyntheticDefaultImports (lines 16 & 42) - Remove duplicate skipLibCheck (lines 18 & 46) - Add TypeScript source files for npm package migration - Verify build pipeline works (42/42 tests pass)
This commit is contained in:
1 parent
fd8fec20d7
commit
77d026869e
37 files changed
+6813
-200
No files matched your search
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
/**
|
||||
* Add shebang to dist/ccs.js and make executable
|
||||
* Run after: tsc
|
||||
*/
|
||||
function addShebang() {
|
||||
const ccsPath = path.join(__dirname, '../dist/ccs.js');
|
||||
|
||||
if (!fs.existsSync(ccsPath)) {
|
||||
console.error('[X] dist/ccs.js not found. Run tsc first.');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
let content = fs.readFileSync(ccsPath, 'utf8');
|
||||
|
||||
// Add shebang if missing
|
||||
if (!content.startsWith('#!/usr/bin/env node')) {
|
||||
content = '#!/usr/bin/env node\n' + content;
|
||||
fs.writeFileSync(ccsPath, content);
|
||||
console.log('[OK] Shebang added to dist/ccs.js');
|
||||
}
|
||||
|
||||
// Make executable (Unix-like systems)
|
||||
if (process.platform !== 'win32') {
|
||||
try {
|
||||
fs.chmodSync(ccsPath, 0o755);
|
||||
console.log('[OK] dist/ccs.js is now executable');
|
||||
} catch (err) {
|
||||
console.warn('[!] Could not chmod dist/ccs.js:', err.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addShebang();
|
||||
Reference in new issue
Block a user