Skip to content

Commit acb3de8

Browse files
committed
chore(nx-plugin): remove ts-node dependency and update JSON file copying script to js from ts
1 parent 5947e2d commit acb3de8

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

packages/nx-plugin/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
},
6464
"devDependencies": {
6565
"@config/vite-base": "workspace:*",
66-
"ts-node": "10.9.2",
6766
"typescript": "5.8.3",
6867
"vitest": "3.1.1"
6968
},

packages/nx-plugin/scripts/copy-json-files.mts renamed to packages/nx-plugin/scripts/copy-json-files.mjs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,25 @@ import {
88
import { dirname, extname, join, resolve } from 'node:path';
99
import { fileURLToPath } from 'node:url';
1010

11-
// Get current directory
1211
const __filename = fileURLToPath(import.meta.url);
1312
const __dirname = dirname(__filename);
1413

15-
// Function to recursively create directories
16-
function ensureDirectoryExists(dirPath: string) {
14+
/**
15+
* Recursively creates a directory if it does not exist.
16+
* @param {string} dirPath
17+
*/
18+
function ensureDirectoryExists(dirPath) {
1719
if (!existsSync(dirPath)) {
1820
mkdirSync(dirPath, { recursive: true });
1921
}
2022
}
2123

22-
// Function to recursively copy JSON files from source to destination
23-
function copyJsonFiles(sourceDir: string, targetDir: string) {
24+
/**
25+
* Recursively copies JSON files from a source directory to a target directory.
26+
* @param {string} sourceDir
27+
* @param {string} targetDir
28+
*/
29+
function copyJsonFiles(sourceDir, targetDir) {
2430
// Read all files and directories in the source directory
2531
const items = readdirSync(sourceDir);
2632

packages/nx-plugin/tsup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default defineConfig((options) => ({
2121
},
2222
format: ['cjs', 'esm'],
2323
minify: !options.watch,
24-
onSuccess: 'node --loader ts-node/esm scripts/copy-json-files.mts',
24+
onSuccess: 'node scripts/copy-json-files.mjs',
2525
outDir: 'dist',
2626
outExtension({ format }) {
2727
return {

0 commit comments

Comments
 (0)