0.0.1 • Published 3 years ago
ngx-convert-to-standalone v0.0.1
ngx-convert-to-standalone
Convert a new Angular project to standalone settings.
This sechmatics will convert angular.json in Angular, add standalone: true settings to projects.[project].schematics.@schematics/angular:[component|directive|pipe].
By default setting, will convert angular.json settings like following.
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"demo1": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"inlineTemplate": true,
"inlineStyle": true,
"standalone": true,
"flat": true
},
"@schematics/angular:directive": {
"standalone": true
},
"@schematics/angular:pipe": {
"standalone": true
}
},
}
}
}Usage
ng add ngx-convert-to-standaloneYou can skip some settings, for example, --skip-component-inline-template=false.
ng add ngx-convert-to-standalone --skip-component-inline-templateThen projects.[project].schematics.@schematics/angular:component will not be changed.
If you have multiple projects, you can specify the project name.
ng add ngx-convert-to-standalone --project=demo1Arguments
--project: Specify the project name. If not set, will set the first project.--skip-component-inline-template: Skip setting"inlineTemplate": truein@schematics/angular:componentsettings. Default isfalse.--skip-component-inline-style: Skip setting"inlineStyle": truein@schematics/angular:componentsettings. Default isfalse.--skip-component-standalone: Skip setting"standalone": truein@schematics/angular:componentsettings. Default isfalse.--skip-component-flat: Skip setting"flat": truein@schematics/angular:componentsettings. Default isfalse.--skip-directive-standalone: Skip setting"standalone": truein@schematics/angular:directivesettings. Default isfalse.--skip-pipe-standalone: Skip setting"standalone": truein@schematics/angular:pipesettings. Default isfalse.
License
MIT