Skip to content

Commit 18454cb

Browse files
committed
refactor: wip
1 parent 52fd35b commit 18454cb

File tree

5 files changed

+31
-11
lines changed

5 files changed

+31
-11
lines changed

.env.example

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
# for uploading to portal
1+
# Example environment variables
2+
# These are for reference only - use .env.local for local development
3+
4+
# For uploading to Code PushUp portal
25
CP_API_KEY=
6+
7+
# Note: For local development with tsx/TypeScript execution,
8+
# copy .env.local.example to .env.local and configure NODE_OPTIONS there

.env.local

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Local development environment variables
2+
# Copy this to .env.local (gitignored) and customize for your setup
3+
4+
# Enable tsx for TypeScript execution in Nx
5+
# This allows running local generator/executor directly as .ts files without pre-compilation
6+
# This allowes the local plugins to import files with .js extensions (same as the packages in the repository)
7+
NODE_OPTIONS=--import tsx
8+
# This is used to resolve the paths in the local generator/executor so local packages can be imported as path aliases
9+
TSX_TSCONFIG_PATH=tsconfig.base.json

.env.local.example

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Local development environment variables
2+
# Copy this to .env.local (gitignored) and customize for your setup
3+
4+
# Enable tsx for TypeScript execution in Nx
5+
# This allows running local generator/executor directly as .ts files without pre-compilation
6+
# This allowes the local plugins to import files with .js extensions (same as the packages in the repository)
7+
NODE_OPTIONS=--import tsx
8+
# This is used to resolve the paths in the local generator/executor so local packages can be imported as path aliases
9+
TSX_TSCONFIG_PATH=tsconfig.base.json
10+
11+
# Local API keys (optional - only if testing upload features)
12+
# CP_API_KEY=your_api_key_here

tools/zod2md-jsdocs/eslint.config.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ module.exports = tseslint.config(
4444
'@nx/dependency-checks': 'error',
4545
},
4646
},
47-
// Nx compiles the sync generators on the fly with SWC and there the .js ending is not working
48-
{
49-
files: ['**/sync-*.ts'],
50-
rules: {
51-
'n/file-extension-in-import': 'off',
52-
},
53-
},
5447
{
5548
files: ['**/package.json', '**/generators.json'],
5649
rules: {

tools/zod2md-jsdocs/src/lib/generators/sync-zod2md-setup/sync-zod2md-setup.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import * as path from 'node:path';
1111
import {
1212
GENERATE_DOCS_TARGET_NAME,
1313
PATCH_TS_TARGET_NAME,
14-
} from '../../plugin/constants';
15-
import { DEFAULT_ZOD2MD_CONFIG_FILE_NAME } from '../configuration/constants';
14+
} from '../../plugin/constants.js';
15+
import { DEFAULT_ZOD2MD_CONFIG_FILE_NAME } from '../configuration/constants.js';
1616
import {
1717
type PluginDefinition,
1818
addZod2MdTransformToTsConfig,
1919
getFirstExistingTsConfig,
20-
} from '../configuration/tsconfig';
20+
} from '../configuration/tsconfig.js';
2121

2222
const missingTsconfig = 'missing-tsconfig' as const;
2323
const missingTarget = 'missing-target' as const;

0 commit comments

Comments
 (0)