JSPM

  • Created
  • Published
  • Downloads 52
  • Score
    100M100P100Q47720F
  • License ISC

Architect Scaffolding for Angular +8X Applications

Package Exports

  • angular-architect

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (angular-architect) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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.

License

MIT