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.
Merge pull request #119 from swarmion/feat/generators/directory-option
Add directory option to generators
- Loading branch information
Showing
19 changed files
with
83 additions
and
53 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
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,16 +1,12 @@ | ||
import { Tree } from '@nrwl/devkit'; | ||
import { symlinkSync } from 'fs'; | ||
import { join, relative } from 'path'; | ||
import { join } from 'path'; | ||
|
||
import { NormalizedSchema } from '../types'; | ||
|
||
export const symlinkVsCodeConfiguration = ( | ||
tree: Tree, | ||
options: NormalizedSchema, | ||
): void => { | ||
const relativePath = relative( | ||
options.projectRoot, | ||
join(tree.root, 'commonConfiguration/.vscode'), | ||
export const symlinkVsCodeConfiguration = (options: NormalizedSchema): void => { | ||
const relativePath = join( | ||
options.offsetFromRoot, | ||
'commonConfiguration/.vscode', | ||
); | ||
symlinkSync(relativePath, join(options.projectRoot, '.vscode'), 'dir'); | ||
symlinkSync(relativePath, join(options.packageRoot, '.vscode'), 'dir'); | ||
}; |
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
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; |
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
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, | ||
}, | ||
}; | ||
}); |
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