Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 00ab36a

Browse files
Chau TranChau Tran
Chau Tran
authored and
Chau Tran
committed
fix: add nx to peer deps for now
1 parent d92769d commit 00ab36a

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

libs/angular-three/ng-package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"lib": {
55
"entryFile": "src/index.ts"
66
},
7-
"allowedNonPeerDependencies": ["ngx-resize", "@rx-angular/state", "@nx/devkit"],
7+
"allowedNonPeerDependencies": ["ngx-resize", "@rx-angular/state", "@nx/devkit", "nx"],
88
"assets": ["metadata.json", "web-types.json"]
99
}

libs/angular-three/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"ngx-resize": "^1.0.0",
3030
"@rx-angular/state": "^14.0.0",
3131
"tslib": "^2.3.0",
32-
"@nx/devkit": "^16.1.0"
32+
"@nx/devkit": "^16.0.0",
33+
"nx": "^16.0.0"
3334
},
3435
"sideEffects": false,
3536
"generators": "./plugin/generators.json",

libs/plugin/src/generators/init/init.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default async function (tree: Tree) {
3737

3838
// add metadata.json to vscode settings if exists
3939
const vscodeSettingsPath = '.vscode/settings.json';
40-
if (tree.exists(vscodeSettingsPath)) {
40+
if (tree.exists('.vscode') || tree.exists(vscodeSettingsPath)) {
4141
logger.info('Enabling typings support for VSCode...');
4242
updateJson(tree, vscodeSettingsPath, (json) => {
4343
if (json['html.customData'] && Array.isArray(json['html.customData'])) {
@@ -48,7 +48,15 @@ export default async function (tree: Tree) {
4848

4949
return json;
5050
});
51+
} else {
52+
logger.info(
53+
`.vscode/settings.json not found.
54+
If you are using VSCode, add "./node_modules/angular-three/metadata.json" to "html.customData" in ".vscode/settings.json"
55+
to enable TypeScript type definitions for Angular Three elements.
56+
`
57+
);
5158
}
59+
5260
return () => {
5361
installPackagesTask(tree);
5462
};

0 commit comments

Comments
 (0)