-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add schematics to @ng-bootstrap/ng-bootstrap
#3669
Conversation
@ng-bootstrap/ng-bootstrap
schematics/ng-add/setup-project.ts
Outdated
import {getAppModulePath} from '@schematics/angular/utility/ng-ast-utils'; | ||
import {getProject} from '@schematics/angular/utility/project'; | ||
import * as path from 'path'; | ||
import * as ts from 'typescript'; |
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.
Recently fixed issue in another library, which was caused by the similar code. @schematics/angular
bundles its own version of TS and as a result AST is created by the workspace version of TS (ts.createSourceFile()
call), while it is modified by the version bundled by @schematics/angular
. If these versions are different it crashes. The reproduction was to ng new my-proj
with latest CLI, change workspace TS to 3.7.5 and ng add <lib>
.
See FortAwesome/angular-fontawesome#238 for more details.
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.
Thank you, will check this
Codecov Report
@@ Coverage Diff @@
## master #3669 +/- ##
==========================================
- Coverage 91.53% 91.53% -0.01%
==========================================
Files 100 100
Lines 2930 2928 -2
Branches 539 539
==========================================
- Hits 2682 2680 -2
Misses 186 186
Partials 62 62
Continue to review full report at Codecov.
|
Pushed the following changes:
Full list of what is supported at the moment:
What is still missing:
@benouat, could you please take a look at this? |
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 mostly agree with the code.
I left a few comments, essentially nitpicking ones ! 😜
Based on the '@ng-bootstrap/schematics' latest version
- `ng add @ng-bootstrap/ng-bootstrap` with optional `--project` - installing `bootstrap`, `@ng-bootstrap/ng-bootstrap` and `@angular/localize` dependencies - adding `@angular/localize` polyfill - adding `NgbModule` to the main application module - adding styles for `.scss` and `.sass` in the style file directly - warning for unsupported project styles for `less`, `stylus` - adding `bootstrap.min.css` to `angular.json` in case of CSS styles / unsupported project styles
- `ng add @ng-bootstrap/ng-bootstrap` with optional `--project` - installing `bootstrap`, `@ng-bootstrap/ng-bootstrap` and `@angular/localize` dependencies - adding `@angular/localize` polyfill - adding `NgbModule` to the main application module - adding styles for `.scss` and `.sass` in the style file directly - warning for unsupported project styles for `less`, `stylus` - adding `bootstrap.min.css` to `angular.json` in case of CSS styles / unsupported project styles fix(schematics): linting
- `ng add @ng-bootstrap/ng-bootstrap` with optional `--project` - installing `bootstrap`, `@ng-bootstrap/ng-bootstrap` and `@angular/localize` dependencies - adding `@angular/localize` polyfill - adding `NgbModule` to the main application module - adding styles for `.scss` and `.sass` in the style file directly - warning for unsupported project styles for `less`, `stylus` - adding `bootstrap.min.css` to `angular.json` in case of CSS styles / unsupported project styles fix(schematics): linting
Based on the latest version of the
@ng-bootstrap/schematics
(it will be deprecated)Mostly technical PR, no new features/fixes:
@ng-bootstrap/schematics
@ng-bootstrap/ng-bootstrap
package with built schematicsFixes #2361
@benouat