AOT-enabled extension support in Spectrum Spatial Analyst:
Creating an extension Development Environment
- npm install --global @angular/cli
- ng new <project-name> --create-application=false
- cd <project-name>
- ng generate library <lib-name>
- copy provided Spectrum Spatial Analyst typings in a dir out of <project-name> dir and provide path in
package.json for property ‘analyst’ in devDependecies. For example:
"analyst": "file:../ssa-typings",
Run npm i @angular-devkit/build-webpack @ngtools/webpack
- Copy provided webpack.config.js and webpack.config.prod.js in <lib-name> directory
- Change entry file and tsConfigPath in webpack.config.js
- Replace @angular-devkit/build-angular:ng-packagr with @angular-devkit/build-webpack:webpack in angular.json
- provide "webpackConfig": "projects/<lib-name>/webpack.config.js" in options of angular.json
- provide "webpackConfig": "projects/<lib-name>/webpack.config.prod.js" in configurations > production of angular.json
- ng build <lib-name>
Run ng generate component component-name --project my-lib to generate a new component
You can also use:
ng generate directive|pipe|service|class|guard|interface|enum|module --project my-lib