Skip to content

Commit

Permalink
[core] Base typescript projects on the file location instead of on cwd (
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot authored May 23, 2024
1 parent 64b3aab commit 4cc5563
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/coreTypescriptProjects.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import path from 'path';
import url from 'url';

const currentDirectory = url.fileURLToPath(new URL('.', String(import.meta.url)));

export default {
'toolpad-core': {
rootPath: path.join(process.cwd(), 'packages/toolpad-core'),
rootPath: path.join(currentDirectory, '../packages/toolpad-core'),
entryPointPath: 'src/index.ts',
},
docs: {
rootPath: path.join(process.cwd(), 'docs'),
rootPath: path.join(currentDirectory, '../docs'),
tsConfigPath: 'tsconfig.json',
},
};

0 comments on commit 4cc5563

Please sign in to comment.