Feature Request: Allow to generate libraries within a particular folder & allow to rename 'projects' folder name
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [ ] bug report -> please search issues before submitting
- [x] feature request
Command (mark with an x
)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [x] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Versions
Latest
Desired functionality
Currently It is not possible to generate a library within a specific folder with relative path.
When I run ng generate library mylib --prefix=mylib
command, it generates a folder called projects
under root directory
and places mylib
under projects
Current Flow,
|---MyFoodApplication
| |---projects
| |---mylib-1
| |---mylib-2
| |---src
Sometimes use-case can be like:
-
Create all libraries under common folder resides at (anywhere) angular project’s root directory. (common is just a folder and nothing else)
-
When I want to create any library, It should create desire name of the folder (eg. companyname-libraries) which must contain all generated library.
So, the final output should be like below,
|---MyFoodApplication
| |---common
| |---companyname-libraries
| |---mylib-1
| |---mylib-2
| |---src
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:6 (2 by maintainers)
Top Results From Across the Web
How can I rename a project folder from within Visual Studio?
In Solution Explorer, double click, or right click on Properties → goto Application Tab, rename Assembly name and Default namespace to match.
Read more >Working with folders and files with REST - Microsoft Learn
Perform basic create, read, update, and delete (CRUD) operations on folders and files with the SharePoint REST interface.
Read more >Rename refactorings | IntelliJ IDEA Documentation - JetBrains
In the Projects tool window right-click a directory or a module that you want to rename. From the context menu, select Refactor |...
Read more >Creating and managing Folders - Google Cloud
A folder can contain projects, other folders, or a combination of both. Organizations can use folders to group projects under the organization node...
Read more >Multi-root Workspaces in Visual Studio Code
Unless you are explicitly creating a multi-root workspace, a "workspace" is just your project's single root folder. Adding folders. It is easy to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@thefliik I have already done it but it should not be a manual process ! That’s why I’ve added this as a feature request.
It’s been two years and this issue remains open. I’ll like to work on it as I’ll find it very useful on a current project. So far I’ve identified the involved line: https://github.com/angular/angular-cli/blob/9ee905d76bd6211e101d712f6782edfceb276114/packages/schematics/angular/library/index.ts#L153
I’m thinking on a CLI argument like
ng generate library my-lib --newProjectRoot=my-prefix-path
in order to be consistent with the JSON config file. Would love to read your comments about it