-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update to standalone components #1174
Conversation
bb7fee5
to
c7158b7
Compare
Currently DockManger throws this error when started: However, this is not a problem with the cli but potentially with the DM package. Since we are initializing the DM in a standalone component, we may need to export the DM component (and potentially some of its internal components) from the package alongside its interfaces, etc. #ref DM issue |
333c3df
to
c2ba933
Compare
Tested with licensed and non-licensed for base, empty, and default templates - for the new standalone default and old legacy one. Everything seems fine, without the following:
They are separate issues so I will proceed with merging this PR. |
Closes #1165
Allows the
igniteui-cli
to generate standalone components. This is achieved by separating the templates' structure in two - one for legacy (module-based) apps and one for apps with standalone components. The project structure for standalone components has been reworked so that it matches the project structure of anng new
with standalone components.Every template for every component that's supported by the cli has been updated to be standalone (in the standalone project structure) and has been cleared out of any redundant configurations.
Routing has been reworked so that now under the
src/app
folder there will be aapp.router.ts
containing all the routes which is then imported in theapp.config.ts
alongside any other global providers. The config file is then provided in themain.ts
where the application bootstrapping occurs.Additionally, for all of the custom templates that exist in the cli, the ability to modify a
@Component
metadata had to be introduced since the templates allow the addition of some or all features of the given component, this concerns mainly the custom grids. This caused the need for the cli to be able to add theimports
property in the@Component
decorator since now all templates are marked asstandalone
by default and we could not just hardcode all of the required dependencies for these components since this would create too much boilerplate code for any templates that just show a bare bones custom grid for example. So, relying on the template'sdependencies
with their imports marked asstandalone
an additional component transformer was introduced that creates a newimports
array in the component's meta.Action list:
ig
command