angular-architect
v2.1.10
Published
Architect Scaffolding for Angular +8X Applications
Downloads
39
Maintainers
Readme
Angular Architect
Angular Architect is a powerful tool that allows you to create complete scaffolding of your application based on a json file.
Installation
Use the package manager npm to install angular-architect.
npm install -g angular-architect
Usage
Create a new app from scratch
ng new myapp
In the rootpath of the project, create the file "angular-architecture.json"
{
"app":{
"modules":[
{
"name":"layout",
"modules":[
{
"name":"admin",
"modules":[
],
"components":[
"admin-layout"
]
},
{
"name":"public",
"modules":[
],
"components":[
"public-header",
"public-layout"
]
}
],
"components":[
]
},
{
"name":"private",
"modules":[
{
"name":"projects",
"service":true,
"ngrx-feature":true,
"component-prefix":false,
"components":[
"choose"
]
},
{
"name":"modulex",
"service":true,
"ngrx-feature":true,
"components":[
"module1",
"module2",
"module3"
]
}
]
}
]
}
}
Run the command
angular-architect
Enjoy
Json Types
App Object
{
'modules': ModuleObject,
'ngrx': boolean
}
Where
modules -> List of modules
ngrx -> Define ff ngrx dependencies will be installed (devTools, effects, actions, store, entity)
Module Object
{
'name': string,
'service': boolean,
'ngrx-feature': boolean,
'components': string[],
'component-prefix': boolean
}
Where
name -> Module name
service -> Service to be created
ngrx-feature -> Complete ngrx Scaffolding (actions, effects, reducers, selectors)
components -> A list of components names to create
component-prefix -> prefix for each component, example. "articles-module" if the module is "articles"
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.