-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Refactoring schematics for standalone migration #22645
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
base: rel-9.2
Are you sure you want to change the base?
Conversation
β¦emplate structure.
|
...package-standalone/__libraryName@kebab__/src/lib/__libraryName@kebab__.component.ts.template
Outdated
Show resolved
Hide resolved
@@ -52,7 +52,8 @@ export async function resolveProject<T = any>( | |||
// @typescript-eslint/no-explicit-any | |||
notFoundValue: T = NOT_FOUND_VALUE as unknown as any, | |||
): Promise<Project | T> { | |||
name = name || readWorkspaceSchema(tree).defaultProject || getFirstApplication(tree).name!; | |||
// name = name || readWorkspaceSchema(tree).defaultProject || getFirstApplication(tree).name!; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we can directly remove this comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed b8996b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Resolves https://github.com/volosoft/volo/issues/19594
β Test Cases
π¦ create-lib
--packageName
--templateType=module
--templateType=standalone
--isSecondaryEntrypoint=true
(nested entrypoint)public-api.ts
--override=false
to skip existing filesπ¨ change-theme
app.module.ts
ormain.ts
providers: [...]
ThemeXModule.forRoot()
)provideThemeXConfig()
)How To Test
1. Build the Schematics Package
Navigate to the
npm/ng-packs
folder and run the following command:This will generate the
dist/packages/schematics
folder undernpm/ng-packs
.2. Link the Built Package Locally
Navigate to the generated schematics folder and link it to your local environment:
cd dist/packages/schematics yarn link
3. Link the Package to Your Angular Project
In your Angular project's root directory (where
package.json
is located), run the following command to create a local reference:yarn link "@abp/ng.schematics"
4. Generate a New Library
Use the following schematic command to generate a new library named
Book
:npx ng g @abp/ng.schematics:create-lib --package-name "Book"
Follow the interactive prompts to complete the setup.
5. Change the Default Theme
To replace the theme, run: