-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pulumi): Move setup of typescript to package
- Loading branch information
Showing
5 changed files
with
27 additions
and
23 deletions.
There are no files selected for viewing
14 changes: 1 addition & 13 deletions
14
packages/pulumi/src/generators/init/files/index.ts.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,5 @@ | ||
/* eslint-disable */ | ||
|
||
import { loadConfig, register } from 'tsconfig-paths' | ||
|
||
const config = loadConfig('.') | ||
if (config.resultType === 'failed') { | ||
console.log('Could not load tsconfig to map paths, aborting.') | ||
process.exit(1) | ||
} | ||
|
||
register({ | ||
baseUrl: config.absoluteBaseUrl, | ||
paths: config.paths | ||
}) | ||
|
||
import '@nx-extend/pulumi' | ||
import './pulumi' | ||
export * from './pulumi' |
3 changes: 0 additions & 3 deletions
3
packages/pulumi/src/generators/init/files/tsconfig.json.template
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { workspaceRoot } from '@nx/devkit' | ||
|
||
import { setupTypescript } from './init' | ||
|
||
setupTypescript(workspaceRoot) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { loadConfig, register } from 'tsconfig-paths' | ||
|
||
export function setupTypescript(directory: string): void { | ||
const config = loadConfig(directory) | ||
if (config.resultType === 'failed') { | ||
console.log('Could not load tsconfig to map paths, aborting.') | ||
process.exit(1) | ||
} | ||
|
||
register({ | ||
baseUrl: config.absoluteBaseUrl, | ||
paths: config.paths | ||
}) | ||
} |