Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When adding a library to the workspace, also update .gitignore #17148

Closed
fireflysemantics opened this issue Mar 4, 2020 · 4 comments
Closed
Labels
area: @schematics/angular needs: more info Reporter must clarify the issue
Milestone

Comments

@fireflysemantics
Copy link

When running ng g library name_of_library also add the libraries node_modules path to the top level .gitignore.

@alan-agius4 alan-agius4 added the needs: more info Reporter must clarify the issue label Mar 4, 2020
@alan-agius4
Copy link
Collaborator

Can you please elaborate a bit more?

You should only have node_modules at the root level of your Angular workspace.

@fireflysemantics
Copy link
Author

Sure. I recently repackaged @fireflysemantics/is using the Angular Package Format. Here's is the gitignore for the project:

https://github.com/fireflysemantics/is/blob/master/.gitignore

Notice:

# dependencies
/node_modules
/projects/is/node_modules

The reason I need projects/is/node_modules is that unless I have this git will see all those files when we run npm i for the local library.

@alan-agius4
Copy link
Collaborator

Hi @fireflysemantics, It’s not a typically scenario that in an Angular workspace you have node_modules nested under projects. Usuallynpm install only happens at the root level of the workspace.

This is also partially related to the fact that Yarn workspaces are not supported #7097

No: removing the leading slash from the entry should also yield the same result.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @schematics/angular needs: more info Reporter must clarify the issue
Projects
None yet
Development

No branches or pull requests

2 participants