This repository has been archived by the owner on Feb 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(generators): use offsetFromRoot in templated files
- Loading branch information
1 parent
635969d
commit 8f8bad7
Showing
9 changed files
with
49 additions
and
21 deletions.
There are no files selected for viewing
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
2 changes: 1 addition & 1 deletion
2
tools/generators/library/files/.eslintrc.js → ...rators/library/files/.eslintrc.js__tmpl__
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
const baseConfig = require('../../.lintstagedrc.js'); | ||
const baseConfig = require('<%= offsetFromRoot %>/.lintstagedrc.js'); | ||
module.exports = baseConfig; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const commonBabelConfig = require('<%= offsetFromRoot %>/commonConfiguration/babel.config'); | ||
|
||
module.exports = commonBabelConfig(); |
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
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,2 +1,2 @@ | ||
const baseConfig = require('../../.lintstagedrc.js'); | ||
const baseConfig = require('<%= offsetFromRoot %>/.lintstagedrc.js'); | ||
module.exports = baseConfig; |
38 changes: 30 additions & 8 deletions
38
tools/generators/service/typed-json-config/tsconfig.json.ts
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,20 +1,42 @@ | ||
import { TsConfig } from '../../types'; | ||
import { joinPathFragments } from '@nrwl/devkit'; | ||
|
||
export const packageTsConfig: TsConfig = { | ||
extends: '../../tsconfig.json', | ||
import { NormalizedSchema, TsConfig } from '../../types'; | ||
|
||
export const packageTsConfig = (options: NormalizedSchema): TsConfig => ({ | ||
extends: joinPathFragments(options.offsetFromRoot, 'tsconfig.json'), | ||
compilerOptions: { | ||
preserveSymlinks: true, | ||
baseUrl: '.', | ||
esModuleInterop: true, | ||
}, | ||
references: [ | ||
{ path: '../../contracts/core-contracts/tsconfig.build.json' }, | ||
{ path: '../../packages/configuration/tsconfig.build.json' }, | ||
{ path: '../../packages/serverless-configuration/tsconfig.build.json' }, | ||
{ path: '../../packages/serverless-helpers/tsconfig.build.json' }, | ||
{ | ||
path: joinPathFragments( | ||
options.offsetFromRoot, | ||
'contracts/core-contracts/tsconfig.build.json', | ||
), | ||
}, | ||
{ | ||
path: joinPathFragments( | ||
options.offsetFromRoot, | ||
'packages/configuration/tsconfig.build.json', | ||
), | ||
}, | ||
{ | ||
path: joinPathFragments( | ||
options.offsetFromRoot, | ||
'packages/serverless-configuration/tsconfig.build.json', | ||
), | ||
}, | ||
{ | ||
path: joinPathFragments( | ||
options.offsetFromRoot, | ||
'packages/serverless-helpers/tsconfig.build.json', | ||
), | ||
}, | ||
], | ||
include: ['./**/*.ts'], | ||
'ts-node': { | ||
files: true, | ||
}, | ||
}; | ||
}); |