angular-architects / nx-ddd-plugin

Nx plugin for structuring a monorepo with domains and layers
313 stars 56 forks source link

[Bug] Add support for workspace.json instead of just angular.json #40

Closed benpsnyder closed 2 years ago

benpsnyder commented 3 years ago

When running schematics and when I have workspace.json and not angular.json, I have to temporarily rename mv workspace.json angular.json

benpsnyder commented 3 years ago

Reference how they handle here: https://github.com/nrwl/nx/blob/master/packages/cli/lib/find-workspace-root.ts

Also ... sample from what I found in libs/ddd/src/schematics/ui/ui.spec.ts

import { NxJson, readJsonInTree } from '@nrwl/workspace';
const workspaceJson = readJsonInTree(tree, '/workspace.json');

So you can check if angular.json or workspace.json exists and proceed accordingly

manfredsteyer commented 3 years ago

I'm wondering: What is the reason for using a workspace.json instead of an angular.json in an Angular project?

manfredsteyer commented 3 years ago

Oh, also, seems like we don't use neither angular.json nor workspace.json in our code. Do I miss sth?

manfredsteyer commented 2 years ago

The next version (2.0.0) is based on Nx Generators and the associated helper functions, e. g. for working with config files. Hence, this will work.