You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be super nice if npm workspaces would be supported with gts.
Currently there are some issues (similar to #490 ) when I want to use gts within my npm workspace projects
When I init gts in one of the repos npm -ws exec npx -- gts init it is creating all needed files and the entries in the package.json in my repository. But the referenced files (e.q. in tsconfig.json or .eslintrc.json ) are not present in the workspace node_modules/ directory because those are installed in root dir (similar to --hoist option with lerna or with yarn workspaces).
It is easy to adjust the files afterwards but you get some error messages because of the post scripts. Also it is against the no configuration stated in the gts docs.
In most cases it is not possible to just use gts in root directory because in some cases different settings for tsconfig and eslint are needed within the workspace directories (e.q. UI and backend implementation in same repo).
Maybe a nice solution would be the following:
running npx gts init in root directory checks the package.json for workspace directory and asks in the cli for which workspaces the init should take place. For those the referenced directories (e.q. tsconfig.json, eslintrc.json,...) are adjusted to point to the root directory node_modules/ installations.
Just a base idea to start a discussion.
Remark
Just have seen the PR #654 . That PR should be related to this issue
The text was updated successfully, but these errors were encountered:
It would be super nice if npm workspaces would be supported with gts.
Currently there are some issues (similar to #490 ) when I want to use
gts
within my npm workspace projectsWhen I init gts in one of the repos
npm -ws exec npx -- gts init
it is creating all needed files and the entries in thepackage.json
in my repository. But the referenced files (e.q. intsconfig.json
or.eslintrc.json
) are not present in the workspacenode_modules/
directory because those are installed in root dir (similar to --hoist option withlerna
or with yarn workspaces).It is easy to adjust the files afterwards but you get some error messages because of the
post
scripts. Also it is against the no configuration stated in thegts
docs.In most cases it is not possible to just use
gts
in root directory because in some cases different settings for tsconfig and eslint are needed within the workspace directories (e.q. UI and backend implementation in same repo).Maybe a nice solution would be the following:
npx gts init
in root directory checks thepackage.json
for workspace directory and asks in the cli for which workspaces theinit
should take place. For those the referenced directories (e.q.tsconfig.json
,eslintrc.json
,...) are adjusted to point to the root directorynode_modules/
installations.Just a base idea to start a discussion.
Remark
Just have seen the PR #654 . That PR should be related to this issue
The text was updated successfully, but these errors were encountered: