-
Notifications
You must be signed in to change notification settings - Fork 12k
Feature request: add ability to define angular.json in TypeScript as a .ts file #12943
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
Comments
would love this as well. That said, is there any way we could define the project definition in just |
I think it relates to this #10612 |
+1 for this, is there any news? Or related PR? But it seems a lot of Angular related tools like |
Having the configuration be represented as data (JSON) provides support for the update and migration stories of the Angular CLI. It would drastically increase the complexity and in many cases prevent the current migration experience from occurring if the format was changed to be code instead of data. Based on this, the Angular CLI does not have any plans to expand the supported formats at this time. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request
Command (mark with an
x
)Versions
Any
Desired functionality
Currently all configuration goes into one single file
angular.json
.As some projects grow in dimensions, such
json
file can get long (in terms of lines) and messy (in terms of number of configurations and alike). To make life easier angular-cli could support also a configuration file in TypeScript (e.g.angular.ts
).Such file could be exporting:
const config: AngularConfiguration = { ... }
.This would make it possible to split the different parts of the configurations in multiple sub-files, that we could import in
angular.ts
configuration constant, and all other awesome things that TypeScript allows us to do.Mention any other details that might be useful
The
cli
could look first forangular.json
, if it does not find it, it could look forangular.ts
. Then, ifangular.ts
is present, it could parse the exportedconfig
constant
(JSON.parse(config)
) and work as usual.Eventually, we could add to the TS config file the ability to define WebPack Plugins to be added to the build process, so that we do not need to run
ng eject
, keeping everything tide and clean. In this case, though, we would need a deeper review of the cli, as theparse
route described above would not work for this purpose.The text was updated successfully, but these errors were encountered: