@eui/cli 21.0.0-alpha.3 → 21.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.version.properties +1 -0
- package/bin/eui-cli.js +47 -0
- package/lib/build.js +155 -0
- package/lib/cli.js +123 -0
- package/lib/config.js +58 -0
- package/lib/generators.js +75 -0
- package/lib/install.js +45 -0
- package/lib/maven-build/build.xml +115 -0
- package/lib/maven-build/lib/ant-contrib-20061014.jar +0 -0
- package/lib/maven-build/pom.xml +64 -0
- package/lib/post-build.js +33 -0
- package/lib/skeletons/_angular/base/.browserslistrc +16 -0
- package/lib/skeletons/_angular/base/.editorconfig +16 -0
- package/lib/skeletons/_angular/base/.euirc.json +8 -0
- package/lib/skeletons/_angular/base/README.md +26 -0
- package/lib/skeletons/_angular/base/angular.json +158 -0
- package/lib/skeletons/_angular/base/gitignore_TO_REPLACE +51 -0
- package/lib/skeletons/_angular/base/mock/app/models/user.js +6 -0
- package/lib/skeletons/_angular/base/mock/app/routes/index.js +5 -0
- package/lib/skeletons/_angular/base/mock/app/routes/user_routes.js +44 -0
- package/lib/skeletons/_angular/base/mock/db/db.json +10 -0
- package/lib/skeletons/_angular/base/mock/server.js +23 -0
- package/lib/skeletons/_angular/base/package.json +38 -0
- package/lib/skeletons/_angular/base/proxy-mock.conf.json +6 -0
- package/lib/skeletons/_angular/base/proxy.conf.json +6 -0
- package/lib/skeletons/_angular/base/src/.eslintrc.json +121 -0
- package/lib/skeletons/_angular/base/src/app/app-starter.service.spec.ts +68 -0
- package/lib/skeletons/_angular/base/src/app/app-starter.service.ts +68 -0
- package/lib/skeletons/_angular/base/src/app/app.component.html +35 -0
- package/lib/skeletons/_angular/base/src/app/app.component.spec.ts +60 -0
- package/lib/skeletons/_angular/base/src/app/app.component.ts +35 -0
- package/lib/skeletons/_angular/base/src/app/app.config.ts +84 -0
- package/lib/skeletons/_angular/base/src/app/app.routes.ts +9 -0
- package/lib/skeletons/_angular/base/src/app/features/home/home.component.html +41 -0
- package/lib/skeletons/_angular/base/src/app/features/home/home.component.ts +17 -0
- package/lib/skeletons/_angular/base/src/app/features/home/home.routes.ts +6 -0
- package/lib/skeletons/_angular/base/src/app/features/module1/components/page1/page1.component.html +7 -0
- package/lib/skeletons/_angular/base/src/app/features/module1/components/page1/page1.component.ts +10 -0
- package/lib/skeletons/_angular/base/src/app/features/module1/components/page2/page2.component.html +7 -0
- package/lib/skeletons/_angular/base/src/app/features/module1/components/page2/page2.component.ts +10 -0
- package/lib/skeletons/_angular/base/src/app/features/module1/module1.component.html +7 -0
- package/lib/skeletons/_angular/base/src/app/features/module1/module1.component.ts +10 -0
- package/lib/skeletons/_angular/base/src/app/features/module1/module1.routes.ts +10 -0
- package/lib/skeletons/_angular/base/src/app/features/module2/module2.component.html +7 -0
- package/lib/skeletons/_angular/base/src/app/features/module2/module2.component.ts +10 -0
- package/lib/skeletons/_angular/base/src/app/features/module2/module2.routes.ts +6 -0
- package/lib/skeletons/_angular/base/src/app/shared/testing/router.mock.ts +18 -0
- package/lib/skeletons/_angular/base/src/assets/config/env-json-config-dev.json +8 -0
- package/lib/skeletons/_angular/base/src/assets/config/env-json-config-prod.json +8 -0
- package/lib/skeletons/_angular/base/src/assets/config/env-json-config.json +7 -0
- package/lib/skeletons/_angular/base/src/assets/i18n/en.json +7 -0
- package/lib/skeletons/_angular/base/src/assets/i18n/fr.json +7 -0
- package/lib/skeletons/_angular/base/src/config/global.ts +33 -0
- package/lib/skeletons/_angular/base/src/config/index.ts +8 -0
- package/lib/skeletons/_angular/base/src/config/modules.ts +7 -0
- package/lib/skeletons/_angular/base/src/dummy.spec.ts +6 -0
- package/lib/skeletons/_angular/base/src/environments/environment.prod.ts +11 -0
- package/lib/skeletons/_angular/base/src/environments/environment.ts +15 -0
- package/lib/skeletons/_angular/base/src/favicon.ico +0 -0
- package/lib/skeletons/_angular/base/src/index.html +20 -0
- package/lib/skeletons/_angular/base/src/karma.conf.js +7 -0
- package/lib/skeletons/_angular/base/src/main.ts +20 -0
- package/lib/skeletons/_angular/base/src/styles.scss +1 -0
- package/lib/skeletons/_angular/base/src/tsconfig.app.json +18 -0
- package/lib/skeletons/_angular/base/src/tsconfig.spec.json +14 -0
- package/lib/skeletons/_angular/base/tsconfig.json +27 -0
- package/lib/skeletons/_angular/base-mobile/angular.json +156 -0
- package/lib/skeletons/_angular/base-mobile/ionic.config.json +5 -0
- package/lib/skeletons/_angular/base-mobile/ngsw-config.json +33 -0
- package/lib/skeletons/_angular/base-mobile/package.json +27 -0
- package/lib/skeletons/_angular/base-mobile/src/app/app-routing.module.ts +18 -0
- package/lib/skeletons/_angular/base-mobile/src/app/app-starter.service.ts +73 -0
- package/lib/skeletons/_angular/base-mobile/src/app/app.component.html +47 -0
- package/lib/skeletons/_angular/base-mobile/src/app/app.component.ts +81 -0
- package/lib/skeletons/_angular/base-mobile/src/app/app.config.ts +81 -0
- package/lib/skeletons/_angular/base-mobile/src/app/app.module.ts +44 -0
- package/lib/skeletons/_angular/base-mobile/src/app/core/components/.gitkeep +0 -0
- package/lib/skeletons/_angular/base-mobile/src/app/core/core.module.ts +89 -0
- package/lib/skeletons/_angular/base-mobile/src/app/core/reducers/index.ts +32 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/about-routing.module.ts +45 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/about.component.html +70 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/about.component.ts +19 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/about.module.ts +30 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/change-log/changelog.component.html +11 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/change-log/changelog.component.ts +102 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/help-support/help-support.component.html +20 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/help-support/help-support.component.ts +75 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/legal-notice/legal-notice.component.html +12 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/legal-notice/legal-notice.component.ts +8 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/licence-details/licence-details.component.html +48 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/licence-details/licence-details.component.ts +7 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/opensource-licences/opensource-licences.component.html +11 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/opensource-licences/opensource-licences.component.ts +31 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/privacy-statement/privacy-statement.component.html +11 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/about/privacy-statement/privacy-statement.component.ts +103 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/home/home-routing.module.ts +15 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/home/home.component.html +11 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/home/home.component.ts +9 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/home/home.module.ts +18 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/components/page1/page1.component.html +11 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/components/page1/page1.component.ts +8 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/components/page2/page2.component.html +11 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/components/page2/page2.component.ts +8 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/module1-routing.module.ts +18 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/module1.component.html +15 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/module1.component.ts +17 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/module1.module.ts +21 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module2/module2-routing.module.ts +16 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module2/module2.component.html +11 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module2/module2.component.ts +7 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module2/module2.module.ts +17 -0
- package/lib/skeletons/_angular/base-mobile/src/app/shared/shared.module.ts +16 -0
- package/lib/skeletons/_angular/base-mobile/src/app/shared/testing/router.mock.ts +18 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/docs/pdf-test.pdf +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/i18n/en.json +25 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/i18n/es.json +24 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/i18n/fr.json +25 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/i18n/tr.json +25 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-1024.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-114.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-120.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-128.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-144.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-152.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-16.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-180.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-192.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-32.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-36.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-384.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-48.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-512.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-57.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-60.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-72.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-76.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/app-icon-96.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1125-2436.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1170-2532.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1179-2556.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1242-2208.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1242-2688.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1284-2778.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1290-2796.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1488-2266.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1536-2048.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1620-2160.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1640-2360.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1668-2224.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-1668-2388.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-2048-2732.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-640-1136.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-750-1334.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-landscape-828-1792.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1125-2436.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1170-2532.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1179-2556.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1242-2208.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1242-2688.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1284-2778.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1290-2796.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1488-2266.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1536-2048.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1620-2160.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1640-2360.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1668-2224.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-1668-2388.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-2048-2732.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-640-1136.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-750-1334.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/icons/apple-splash-portrait-828-1792.png +0 -0
- package/lib/skeletons/_angular/base-mobile/src/assets/images/app-icon.svg +10 -0
- package/lib/skeletons/_angular/base-mobile/src/config/global.ts +39 -0
- package/lib/skeletons/_angular/base-mobile/src/config/index.ts +8 -0
- package/lib/skeletons/_angular/base-mobile/src/config/modules.ts +7 -0
- package/lib/skeletons/_angular/base-mobile/src/index.html +76 -0
- package/lib/skeletons/_angular/base-mobile/src/main.ts +23 -0
- package/lib/skeletons/_angular/base-mobile/src/manifest.webmanifest +66 -0
- package/lib/skeletons/_angular/base-mobile/src/tsconfig.app.json +20 -0
- package/lib/skeletons/_angular/options/ecl-ec/angular.json +181 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/app.component.html +237 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/app.component.ts +65 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/app.config.ts +84 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/home/home.component.html +71 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/home/home.component.ts +20 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/module1/components/page1/page1.component.html +1 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/module1/components/page1/page1.component.ts +7 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/module1/components/page2/page2.component.html +1 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/module1/components/page2/page2.component.ts +7 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/module1/module1.component.html +1 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/module1/module1.component.ts +7 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/module2/module2.component.html +1 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/module2/module2.component.ts +7 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/config/global.ts +23 -0
- package/lib/skeletons/_angular/options/ecl-eu/angular.json +181 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/app.component.html +203 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/app.component.ts +65 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/app.config.ts +84 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/home/home.component.html +71 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/home/home.component.ts +20 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module1/components/page1/page1.component.html +1 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module1/components/page1/page1.component.ts +7 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module1/components/page2/page2.component.html +1 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module1/components/page2/page2.component.ts +7 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module1/module1.component.html +1 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module1/module1.component.ts +7 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module2/module2.component.html +1 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module2/module2.component.ts +7 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/app/shared/shared.module.ts +19 -0
- package/lib/skeletons/_angular/options/ecl-eu/src/config/global.ts +23 -0
- package/lib/skeletons/web-maven/package.json +17 -0
- package/lib/skeletons/web-maven/pom.xml +55 -0
- package/lib/skeletons/web-maven/src/main/java/eu/europa/ec/digit/eui/angular2clistarter/servlet/SpringWebApplicationInitializer.java +22 -0
- package/lib/skeletons/web-maven/src/main/java/eu/europa/ec/digit/eui/angular2clistarter/spring/SpringRestConfiguration.java +24 -0
- package/lib/skeletons/web-maven/src/main/java/eu/europa/ec/digit/eui/angular2clistarter/spring/rest/UserDetailsResource.java +23 -0
- package/lib/skeletons/web-maven/src/main/resources/ecas-config-application-name.xml +7 -0
- package/lib/skeletons/web-maven/src/main/webapp/WEB-INF/dispatcher-servlet.xml +11 -0
- package/lib/skeletons/web-maven/src/main/webapp/WEB-INF/web.xml +38 -0
- package/lib/skeletons/web-maven/src/main/webapp/WEB-INF/weblogic.xml +16 -0
- package/lib/skeletons/web-maven/src/main/webapp/index.jsp +30 -0
- package/lib/skeletons/web-spring-boot/myapp-web/pom.xml +83 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/pom.xml +83 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/MyappApplication.java +46 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/domain/Address.java +65 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/domain/Building.java +44 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/repositories/BuildingRepository.java +11 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/resources/BuildingResource.java +26 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/resources/SwaggerConfig.java +16 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/resources/support/HateoasPageableHandlerMethodArgumentResolver.java +45 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/resources/support/HypermediaSupport.java +25 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/resources/support/PageJsonSerializer.java +17 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/security/CachingPreventionFilter.java +29 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/security/CsrfPreventionFilter.java +35 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/security/FakeAuthenticationFilter.java +372 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/security/SecurityConfig.java +47 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/services/BuildingSearchCriteria.java +26 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/services/BuildingService.java +10 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/java/myapp/services/BuildingServiceImpl.java +26 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/resources/application.properties +0 -0
- package/lib/skeletons/web-spring-boot/myapp-web-rest/src/main/resources/data.sql +11 -0
- package/lib/skeletons/web-spring-boot/pom.xml +30 -0
- package/lib/skeletons/web-symfony/myapp-web/angular.json +169 -0
- package/lib/skeletons/web-symfony/myapp-web/package.json +23 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/app-routing.module.ts +18 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/app.component.ts +77 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/components/products.component.html +160 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/components/products.component.scss +0 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/components/products.component.ts +104 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/models/product.model.ts +6 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/products-routing.module.ts +16 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/products.module.ts +16 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/services/products.service.ts +29 -0
- package/lib/skeletons/web-symfony/myapp-web/src/environments/environment.ts +17 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/.env +28 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/bin/console +42 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/composer.json +67 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/composer.lock +3572 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/bootstrap.php +21 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/bundles.php +12 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/config.yml +0 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/cache.yaml +19 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/dev/routing.yaml +3 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/doctrine.yaml +29 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/doctrine_migrations.yaml +5 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/framework.yaml +17 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/prod/doctrine.yaml +32 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/routing.yaml +4 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/sensio_framework_extra.yaml +3 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/test/framework.yaml +4 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/test/routing.yaml +3 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/twig.yaml +4 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/routes/annotations.yaml +3 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/routes/dev/twig.yaml +3 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/routes.yaml +3 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/services.yaml +27 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/public/index.php +27 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Controller/ProductController.php +196 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Entity/Product.php +99 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Kernel.php +53 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Migrations/Version20190604101623.php +31 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Migrations/Version20190604101638.php +35 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Repository/ProductRepository.php +51 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/symfony.lock +274 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/templates/base.html.twig +12 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/templates/lucky/number.html.twig +1 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/templates/product/index.html.twig +20 -0
- package/lib/utils.js +13 -0
- package/package.json +1 -1
- package/sonar-project.properties +14 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
19.3.2
|
package/bin/eui-cli.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const chalk = require('chalk');
|
|
4
|
+
const tools = require('@eui/tools/scripts/utils/tools');
|
|
5
|
+
const figlet = require('figlet');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const fs = require('fs');
|
|
8
|
+
const generators = require('../lib/generators');
|
|
9
|
+
const config = require('../lib/config');
|
|
10
|
+
|
|
11
|
+
// fetching cli arguments
|
|
12
|
+
const args = tools.getArgs();
|
|
13
|
+
|
|
14
|
+
// Print header and version
|
|
15
|
+
console.info(
|
|
16
|
+
'\n\n',
|
|
17
|
+
chalk.yellow(figlet.textSync('eUI CLI', { horizontalLayout: 'full' })),
|
|
18
|
+
chalk.green(`\n v${config.version}\n`)
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
// remapping config if passed as argument - automated mode
|
|
22
|
+
let inputConfig = config.parseInputConfig(args.config);
|
|
23
|
+
|
|
24
|
+
// Detecting targetPath and create it if present as argument - local and automated mode
|
|
25
|
+
let targetPath;
|
|
26
|
+
|
|
27
|
+
if (args.targetPath) {
|
|
28
|
+
targetPath = path.join(config.targetPath, args.targetPath);
|
|
29
|
+
|
|
30
|
+
if (!tools.isDirExists(targetPath)) {
|
|
31
|
+
tools.mkdir(targetPath);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// otherwise taking the default config targetPath defined
|
|
35
|
+
} else {
|
|
36
|
+
targetPath = config.targetPath;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (args.v) {
|
|
40
|
+
console.info('Current eUI CLI version installed : ' + config.version);
|
|
41
|
+
|
|
42
|
+
} else {
|
|
43
|
+
return generators.appGenerate({
|
|
44
|
+
inputConfig: inputConfig,
|
|
45
|
+
targetPath: targetPath
|
|
46
|
+
});
|
|
47
|
+
}
|
package/lib/build.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
const tools = require('@eui/tools/scripts/utils/tools');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const utils = require('./utils');
|
|
4
|
+
const config = require('./config');
|
|
5
|
+
const childProcess = require('child_process');
|
|
6
|
+
const execa = require('execa');
|
|
7
|
+
const execSync = childProcess.execSync;
|
|
8
|
+
|
|
9
|
+
module.exports.start = (options) => {
|
|
10
|
+
return Promise.resolve()
|
|
11
|
+
.then(() => {
|
|
12
|
+
return build(options.config, options.targetPath)
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
.catch((e) => {
|
|
16
|
+
throw e;
|
|
17
|
+
})
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const build = (cliConfig, targetPath) => {
|
|
21
|
+
let {appName, appType, appSubType, tag, groupId, artifactId, ...args} = cliConfig;
|
|
22
|
+
|
|
23
|
+
console.log(`Building app : ${appType}`);
|
|
24
|
+
|
|
25
|
+
return Promise.resolve()
|
|
26
|
+
.then(() => {
|
|
27
|
+
let target = targetPath;
|
|
28
|
+
console.log(`--cleaning target : ${target}`);
|
|
29
|
+
|
|
30
|
+
if (!tools.isDirEmpty(target)) {
|
|
31
|
+
tools.logError(`Target directory : ${target} is not empty, execute eUI CLI in a blank directory... quitting`);
|
|
32
|
+
throw new Error('DIR_NOT_EMPTY');
|
|
33
|
+
} else {
|
|
34
|
+
return tools.rimraf(`${target}/**/*`);
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
.then(() => {
|
|
39
|
+
|
|
40
|
+
// BUILD ANGULAR
|
|
41
|
+
if (appType === 'angular' || appType === 'mobile') {
|
|
42
|
+
return Promise.resolve()
|
|
43
|
+
.then(() => {
|
|
44
|
+
console.log('---building angular');
|
|
45
|
+
const angularPath = utils.getAngularPath(targetPath, appName, appType, artifactId);
|
|
46
|
+
console.log(angularPath);
|
|
47
|
+
return copyAngular(angularPath, cliConfig, true);
|
|
48
|
+
})
|
|
49
|
+
.catch((e) => {
|
|
50
|
+
throw e;
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// BUILD web-maven
|
|
55
|
+
if (appType === 'web-maven') {
|
|
56
|
+
return Promise.resolve()
|
|
57
|
+
.then(() => {
|
|
58
|
+
console.log('--building web-maven');
|
|
59
|
+
return tools.copydir(config.webMavenPath, targetPath);
|
|
60
|
+
})
|
|
61
|
+
.then(() => {
|
|
62
|
+
const angularPath = utils.getAngularPath(targetPath, appName, appType);
|
|
63
|
+
return copyAngular(angularPath, cliConfig);
|
|
64
|
+
})
|
|
65
|
+
.catch((e) => {
|
|
66
|
+
throw e;
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// BUILD web-spring-boot
|
|
71
|
+
if (appType === 'web-spring-boot') {
|
|
72
|
+
return Promise.resolve()
|
|
73
|
+
.then(() => {
|
|
74
|
+
console.log('--building web-spring-boot');
|
|
75
|
+
return execSync(`mvn generate-sources -f ./maven-build/pom.xml -Pbuild-web-spring-boot -Dsrc.path=${config.webSpringBootPath} -Dtarget.path=${targetPath} -Dapp.group.id=${groupId} -Dapp.artifact.id=${artifactId}`, {
|
|
76
|
+
cwd: path.join(__dirname),
|
|
77
|
+
stdio: "inherit"
|
|
78
|
+
});
|
|
79
|
+
})
|
|
80
|
+
.then(() => {
|
|
81
|
+
const angularPath = utils.getAngularPath(targetPath, appName, appType, artifactId);
|
|
82
|
+
return copyAngular(angularPath, cliConfig, false);
|
|
83
|
+
})
|
|
84
|
+
.catch((e) => {
|
|
85
|
+
throw e;
|
|
86
|
+
})
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
// BUILD symfony
|
|
91
|
+
if (appType === 'web-symfony') {
|
|
92
|
+
|
|
93
|
+
return Promise.resolve()
|
|
94
|
+
.then(() => {
|
|
95
|
+
console.log('--cloning eui php starter repository')
|
|
96
|
+
execa.shellSync(`git clone https://${config.webPhpStarterRepo} ${targetPath}`);
|
|
97
|
+
})
|
|
98
|
+
.then(() => {
|
|
99
|
+
console.log('--building web-symfony');
|
|
100
|
+
const angularPath = utils.getAngularPath(targetPath, appName, appType, artifactId);
|
|
101
|
+
return copyAngular(angularPath, cliConfig, false);
|
|
102
|
+
})
|
|
103
|
+
.then(() => {
|
|
104
|
+
execa.shellSync(`npm run init`, { cwd: path.join(targetPath, 'server'), stdio: "inherit" });
|
|
105
|
+
})
|
|
106
|
+
.catch((e) => {
|
|
107
|
+
throw e;
|
|
108
|
+
})
|
|
109
|
+
.finally(() => {
|
|
110
|
+
return tools.rimraf(`${targetPath}/.git`);
|
|
111
|
+
})
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
})
|
|
115
|
+
.catch((e) => {
|
|
116
|
+
console.log(e);
|
|
117
|
+
throw e;
|
|
118
|
+
})
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
const copyAngular = (targetPath, cliConfig, overwrite = true) => {
|
|
125
|
+
return Promise.resolve()
|
|
126
|
+
.then(() => {
|
|
127
|
+
const {angularBasePath} = config;
|
|
128
|
+
const sourcePath = angularBasePath;
|
|
129
|
+
|
|
130
|
+
return tools.copydir(sourcePath, targetPath, overwrite);
|
|
131
|
+
})
|
|
132
|
+
.then(() => {
|
|
133
|
+
if (cliConfig.appType === 'mobile') {
|
|
134
|
+
return tools.copydir(config.angularBaseMobilePath, targetPath, overwrite);
|
|
135
|
+
}
|
|
136
|
+
})
|
|
137
|
+
.then(() => {
|
|
138
|
+
if (cliConfig.appOptions && cliConfig.appOptions.length !== 0) {
|
|
139
|
+
cliConfig.appOptions.forEach((item) => {
|
|
140
|
+
if (item !== 'ecl') {
|
|
141
|
+
console.log('Applying option : ' + item);
|
|
142
|
+
tools.copydir(config.optionsPath[item], targetPath, true);
|
|
143
|
+
}
|
|
144
|
+
})
|
|
145
|
+
if (cliConfig.appOptions.includes('ecl') && cliConfig.appOptionsEclTheme) {
|
|
146
|
+
console.log(`eUI ECL theme selected : ` + cliConfig.appOptionsEclTheme);
|
|
147
|
+
tools.copydir(config.optionsPath[cliConfig.appOptionsEclTheme], targetPath, true);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return Promise.resolve();
|
|
151
|
+
})
|
|
152
|
+
.catch((e) => {
|
|
153
|
+
throw e;
|
|
154
|
+
})
|
|
155
|
+
}
|
package/lib/cli.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
const inquirer = require('inquirer');
|
|
2
|
+
|
|
3
|
+
const defaultConfig = {
|
|
4
|
+
appName: 'my-app',
|
|
5
|
+
appScope: '@app',
|
|
6
|
+
appType: 'angular',
|
|
7
|
+
appOptions: [],
|
|
8
|
+
appOptionsEclTheme: 'ecl-ec',
|
|
9
|
+
appFeatures: [],
|
|
10
|
+
groupId: 'ec.europa.digit',
|
|
11
|
+
artifactId: 'myapp',
|
|
12
|
+
useYarn: true,
|
|
13
|
+
npmInstall: true,
|
|
14
|
+
appStart: true,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
module.exports.start = (options) => {
|
|
18
|
+
|
|
19
|
+
// if inputConfig is provided, we merge it with defaultConfig and return without CLI interactions
|
|
20
|
+
if (options.inputConfig) {
|
|
21
|
+
return {
|
|
22
|
+
...defaultConfig,
|
|
23
|
+
...options.inputConfig
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// CLI interactions
|
|
28
|
+
return inquirer.prompt([
|
|
29
|
+
{
|
|
30
|
+
type: 'list',
|
|
31
|
+
name: 'appType',
|
|
32
|
+
message: 'Select an application type :',
|
|
33
|
+
choices: [
|
|
34
|
+
{ name: 'eUI Angular - Desktop', value: 'angular' },
|
|
35
|
+
{ name: 'eUI Angular - Mobile Ionic', value: 'mobile' },
|
|
36
|
+
{ name: 'eUI Angular + Spring Boot web module - JDK + Maven required !!!', value: 'web-spring-boot' },
|
|
37
|
+
{ name: 'eUI Angular + Maven web module (JEE Spring maven web module) - JDK + Maven required !!!', value: 'web-maven' },
|
|
38
|
+
{ name: 'eUI Angular + PHP/Symfony starter - PHP7 and composer required !!!', value: 'web-symfony' },
|
|
39
|
+
],
|
|
40
|
+
default: 0,
|
|
41
|
+
validate: function (value) {
|
|
42
|
+
if (value.length) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'groupId',
|
|
49
|
+
type: 'input',
|
|
50
|
+
message: 'Enter the groupId :',
|
|
51
|
+
default: defaultConfig.groupId,
|
|
52
|
+
validate: function (value) {
|
|
53
|
+
if (value.length) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
when: function (answers) {
|
|
58
|
+
return (answers.appType === 'web-spring-boot');
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'artifactId',
|
|
63
|
+
type: 'input',
|
|
64
|
+
message: 'Enter the artifactId :',
|
|
65
|
+
default: defaultConfig.artifactId,
|
|
66
|
+
validate: function (value) {
|
|
67
|
+
if (value.length) {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
when: function (answers) {
|
|
72
|
+
return (answers.appType === 'web-spring-boot');
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
type: 'checkbox',
|
|
77
|
+
name: 'appOptions',
|
|
78
|
+
default: defaultConfig.appOptions,
|
|
79
|
+
message: 'Select one or more additional configuration options :',
|
|
80
|
+
choices: [
|
|
81
|
+
{ name: 'eUI ECL app-shell template and configuration - for ec.europa.eu apps', value: 'ecl' },
|
|
82
|
+
],
|
|
83
|
+
when: function (answers) {
|
|
84
|
+
return (answers.appType !== 'mobile');
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
{
|
|
89
|
+
type: 'list',
|
|
90
|
+
name: 'appOptionsEclTheme',
|
|
91
|
+
default: defaultConfig.appOptionsEclTheme,
|
|
92
|
+
message: 'Select which eUI ECL theme flavor you need :',
|
|
93
|
+
choices: [
|
|
94
|
+
{ name: 'eUI ECL - EC theme', value: 'ecl-ec' },
|
|
95
|
+
{ name: 'eUI ECL - EU theme', value: 'ecl-eu' },
|
|
96
|
+
],
|
|
97
|
+
when: function (answers) {
|
|
98
|
+
return (answers.appOptions && answers.appOptions.includes('ecl') && answers.appType !== 'mobile');
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
{
|
|
103
|
+
name: 'npmInstall',
|
|
104
|
+
type: 'confirm',
|
|
105
|
+
message: 'Yarn install dependencies when the app is generated :',
|
|
106
|
+
default: defaultConfig.npmInstall
|
|
107
|
+
}
|
|
108
|
+
])
|
|
109
|
+
.then((answers) => {
|
|
110
|
+
let outputConfig;
|
|
111
|
+
outputConfig = {
|
|
112
|
+
...defaultConfig,
|
|
113
|
+
...answers
|
|
114
|
+
};
|
|
115
|
+
console.log('--provided config : \n', outputConfig);
|
|
116
|
+
return outputConfig;
|
|
117
|
+
})
|
|
118
|
+
.catch((e) => {
|
|
119
|
+
throw e;
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
}
|
|
123
|
+
|
package/lib/config.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
|
|
3
|
+
const skeletonsPath = path.join(__dirname, 'skeletons');
|
|
4
|
+
const version = require(path.join(__dirname, '../package.json')).version;
|
|
5
|
+
|
|
6
|
+
module.exports.targetPath = path.resolve(process.cwd());
|
|
7
|
+
module.exports.skeletonsPath = skeletonsPath;
|
|
8
|
+
|
|
9
|
+
module.exports.angularBasePath = path.join(skeletonsPath, '_angular/base');
|
|
10
|
+
module.exports.angularBaseMobilePath = path.join(skeletonsPath, '_angular/base-mobile');
|
|
11
|
+
|
|
12
|
+
module.exports.webMavenPath = path.join(skeletonsPath, 'web-maven');
|
|
13
|
+
module.exports.webSpringBootPath = path.join(skeletonsPath, 'web-spring-boot');
|
|
14
|
+
|
|
15
|
+
module.exports.webPhpStarterRepo = 'webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-php-starter.git'
|
|
16
|
+
module.exports.webSymfonyPath = path.join(skeletonsPath, 'web-symfony');
|
|
17
|
+
|
|
18
|
+
module.exports.optionsPath = {
|
|
19
|
+
"ecl-ec": path.join(skeletonsPath, '_angular/options/ecl-ec'),
|
|
20
|
+
"ecl-eu": path.join(skeletonsPath, '_angular/options/ecl-eu'),
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
module.exports.version = version;
|
|
24
|
+
|
|
25
|
+
// f.e. :
|
|
26
|
+
// eui-cli --config appType:angular,npmInstall:false --targetPath eui-angular
|
|
27
|
+
// eui-cli --config appType:angular,appOptions:ecl,npmInstall:false --targetPath eui-angular-ecl-ec
|
|
28
|
+
|
|
29
|
+
module.exports.parseInputConfig = (inputConfig) => {
|
|
30
|
+
|
|
31
|
+
if (!inputConfig) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const configArray = inputConfig.split(',').map(item => {
|
|
36
|
+
const x = item.split(':');
|
|
37
|
+
|
|
38
|
+
const propName = x[0];
|
|
39
|
+
let value = x[1];
|
|
40
|
+
|
|
41
|
+
// treating text to boolean values : f.e. : npmInstall=true
|
|
42
|
+
if (value === 'true') {
|
|
43
|
+
value = true;
|
|
44
|
+
}
|
|
45
|
+
if (value === 'false') {
|
|
46
|
+
value = false;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// treating string array values : f.e. : appOptions=ecl_something
|
|
50
|
+
if (propName === 'appOptions') {
|
|
51
|
+
value = value.split('_');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return { [propName]: value };
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
return Object.assign({}, ...configArray);
|
|
58
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
const chalk = require('chalk');
|
|
2
|
+
const childProcess = require('child_process');
|
|
3
|
+
const execSync = childProcess.execSync;
|
|
4
|
+
const cli = require('./cli');
|
|
5
|
+
const build = require('./build');
|
|
6
|
+
const postBuild = require('./post-build');
|
|
7
|
+
const install = require('./install');
|
|
8
|
+
const path = require('path');
|
|
9
|
+
const utils = require('./utils');
|
|
10
|
+
|
|
11
|
+
const appGenerate = (options) => {
|
|
12
|
+
if (options.inputConfig) {
|
|
13
|
+
console.info(chalk.cyan('Creating your project - automated mode : \n'));
|
|
14
|
+
} else {
|
|
15
|
+
console.info(chalk.cyan('Configuring your project : please answer the following : \n'));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Query the questions
|
|
19
|
+
// -------------------
|
|
20
|
+
return Promise.resolve()
|
|
21
|
+
.then(() => {
|
|
22
|
+
return cli.start(options);
|
|
23
|
+
})
|
|
24
|
+
.then((config) => {
|
|
25
|
+
// Storing config
|
|
26
|
+
// --------------
|
|
27
|
+
const cliConfig = config;
|
|
28
|
+
// Building the file structure
|
|
29
|
+
// ---------------------------
|
|
30
|
+
return build.start({
|
|
31
|
+
config: config,
|
|
32
|
+
targetPath: options.targetPath
|
|
33
|
+
})
|
|
34
|
+
// Post build operations
|
|
35
|
+
// ---------------------
|
|
36
|
+
.then(() => {
|
|
37
|
+
return postBuild.start({
|
|
38
|
+
config: cliConfig,
|
|
39
|
+
targetPath: options.targetPath
|
|
40
|
+
});
|
|
41
|
+
})
|
|
42
|
+
// Install dependencies
|
|
43
|
+
// --------------------
|
|
44
|
+
.then(() => {
|
|
45
|
+
return install.start({
|
|
46
|
+
config: cliConfig,
|
|
47
|
+
targetPath: options.targetPath,
|
|
48
|
+
});
|
|
49
|
+
})
|
|
50
|
+
// starting app
|
|
51
|
+
.then(() => {
|
|
52
|
+
if (!cliConfig.appStart || typeof cliConfig.npmInstall !== 'boolean' || !cliConfig.npmInstall) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
console.log('');
|
|
56
|
+
console.log('');
|
|
57
|
+
console.log('*****************************************************************');
|
|
58
|
+
console.log(chalk.cyan(' Starting eUI app... browser will open soon on localhost:4200'));
|
|
59
|
+
console.log('*****************************************************************');
|
|
60
|
+
|
|
61
|
+
const wd = path.resolve(utils.getAngularPath(options.targetPath, cliConfig.appName, cliConfig.appType, cliConfig.artifactId));
|
|
62
|
+
return execSync("npm start", { cwd: wd, stdio: "inherit" });
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
.catch((e) => {
|
|
66
|
+
console.error(e);
|
|
67
|
+
process.exitCode = 1;
|
|
68
|
+
})
|
|
69
|
+
.finally(() => process.exit())
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
module.exports = {
|
|
74
|
+
appGenerate,
|
|
75
|
+
};
|
package/lib/install.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const childProcess = require('child_process');
|
|
2
|
+
const execSync = childProcess.execSync;
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const tools = require('@eui/tools/scripts/utils/tools');
|
|
5
|
+
const utils = require('./utils');
|
|
6
|
+
const chalk = require('chalk');
|
|
7
|
+
|
|
8
|
+
module.exports.start = (options) => {
|
|
9
|
+
|
|
10
|
+
if (typeof options.config.npmInstall !== 'boolean' || !options.config.npmInstall) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return Promise.resolve()
|
|
15
|
+
.then(() => {
|
|
16
|
+
return install(options.config, options.targetPath)
|
|
17
|
+
})
|
|
18
|
+
.catch((e) => {
|
|
19
|
+
throw e;
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const install = (cliConfig, targetPath) => {
|
|
24
|
+
|
|
25
|
+
const wd = path.resolve(utils.getAngularPath(targetPath, cliConfig.appName, cliConfig.appType, cliConfig.artifactId));
|
|
26
|
+
|
|
27
|
+
console.log('');
|
|
28
|
+
console.log('');
|
|
29
|
+
console.log('*****************************************************');
|
|
30
|
+
console.log(chalk.cyan(' Installing app dependencies... PLEASE WAIT....'));
|
|
31
|
+
console.log('*****************************************************');
|
|
32
|
+
|
|
33
|
+
return Promise.resolve()
|
|
34
|
+
.then(() => {
|
|
35
|
+
return tools.remove(path.join(wd, 'yarn.lock'));
|
|
36
|
+
})
|
|
37
|
+
.then(() => {
|
|
38
|
+
return execSync("yarn", { cwd: wd, stdio: "inherit" });
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
.catch((e) => {
|
|
42
|
+
throw e;
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<project name="eUI-build" basedir=".">
|
|
3
|
+
|
|
4
|
+
<taskdef resource="net/sf/antcontrib/antlib.xml">
|
|
5
|
+
<classpath>
|
|
6
|
+
<fileset dir="lib" includes="ant-contrib-*.jar"/>
|
|
7
|
+
</classpath>
|
|
8
|
+
</taskdef>
|
|
9
|
+
|
|
10
|
+
<scriptdef language="javascript" name="lower">
|
|
11
|
+
<attribute name="string" />
|
|
12
|
+
<attribute name="to" />
|
|
13
|
+
|
|
14
|
+
project.setProperty( attributes.get( "to" ),
|
|
15
|
+
attributes.get( "string" ).toLowerCase() );
|
|
16
|
+
</scriptdef>
|
|
17
|
+
|
|
18
|
+
<scriptdef language="javascript" name="ucfirst">
|
|
19
|
+
<attribute name="string" />
|
|
20
|
+
<attribute name="to" />
|
|
21
|
+
|
|
22
|
+
var the_string = attributes.get( "string" );
|
|
23
|
+
project.setProperty( attributes.get( "to" ),
|
|
24
|
+
the_string.substr(0,1).toUpperCase() + the_string.substr(1) );
|
|
25
|
+
</scriptdef>
|
|
26
|
+
|
|
27
|
+
<scriptdef name="camelCaseString" language="javascript">
|
|
28
|
+
<attribute name="text" />
|
|
29
|
+
<attribute name="separator" />
|
|
30
|
+
<attribute name="property" />
|
|
31
|
+
<attribute name="first" />
|
|
32
|
+
<![CDATA[
|
|
33
|
+
var string = attributes.get("text");
|
|
34
|
+
var stringArray = string.split(attributes.get("separator"));
|
|
35
|
+
var result = "";
|
|
36
|
+
var s;
|
|
37
|
+
|
|
38
|
+
for (var i=0; i<stringArray.length;i++) {
|
|
39
|
+
s = stringArray[i];
|
|
40
|
+
if (i == 0) {
|
|
41
|
+
if (attributes.get("first") == 'true') {
|
|
42
|
+
result += s.substring(0,1).toUpperCase() + s.substr(1);
|
|
43
|
+
} else {
|
|
44
|
+
result += s;
|
|
45
|
+
}
|
|
46
|
+
} else {
|
|
47
|
+
result += s.substring(0,1).toUpperCase() + s.substr(1);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
project.setProperty(attributes.get("property"), result);
|
|
52
|
+
]]>
|
|
53
|
+
</scriptdef>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
<macrodef name="replaceAll" taskname="@{taskname}">
|
|
57
|
+
<attribute name="src" />
|
|
58
|
+
<attribute name="dest" default="" />
|
|
59
|
+
<attribute name="replace" default="" />
|
|
60
|
+
<attribute name="with" default="" />
|
|
61
|
+
<sequential>
|
|
62
|
+
<loadresource property="@{dest}">
|
|
63
|
+
<propertyresource name="@{src}" />
|
|
64
|
+
<filterchain>
|
|
65
|
+
<tokenfilter>
|
|
66
|
+
<filetokenizer/>
|
|
67
|
+
<replacestring from="@{replace}" to="@{with}"/>
|
|
68
|
+
</tokenfilter>
|
|
69
|
+
</filterchain>
|
|
70
|
+
</loadresource>
|
|
71
|
+
</sequential>
|
|
72
|
+
</macrodef>
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
<!--======================================================================-->
|
|
77
|
+
<!-- TOKEN FILTERS -->
|
|
78
|
+
<!--======================================================================-->
|
|
79
|
+
|
|
80
|
+
<!--application files replacement-->
|
|
81
|
+
<filter token="app.name" value="${app.artifact.id}"/>
|
|
82
|
+
<filter token="app.name.display" value="${app.artifact.id}"/>
|
|
83
|
+
<filter token="app.group.id" value="${app.group.id}"/>
|
|
84
|
+
|
|
85
|
+
<target name="generate.web-spring-boot">
|
|
86
|
+
<echo></echo>
|
|
87
|
+
<echo>TARGET : ${target.path}</echo>
|
|
88
|
+
<echo></echo>
|
|
89
|
+
<echo>app.name: ${app.name}</echo>
|
|
90
|
+
<echo>app.artifact.id: ${app.artifact.id}</echo>
|
|
91
|
+
<echo>app.group.id: ${app.group.id}</echo>
|
|
92
|
+
<echo></echo>
|
|
93
|
+
|
|
94
|
+
<copy todir="${target.path}" filtering="true" overwrite="true">
|
|
95
|
+
<fileset dir="${src.path}"/>
|
|
96
|
+
</copy>
|
|
97
|
+
|
|
98
|
+
<!--REPLACE MODULE NAMES DIRECTORIES-->
|
|
99
|
+
<move toFile="${target.path}/${app.artifact.id}-web-rest"
|
|
100
|
+
file="${target.path}/myapp-web-rest"/>
|
|
101
|
+
<move toFile="${target.path}/${app.artifact.id}-web"
|
|
102
|
+
file="${target.path}/myapp-web"/>
|
|
103
|
+
|
|
104
|
+
<!--RENAMING JAVA SOURCES TARGET by custom app group id provided-->
|
|
105
|
+
|
|
106
|
+
<replaceAll src="app.group.id" dest="app.group.id.dir" replace="." with="/"/>
|
|
107
|
+
|
|
108
|
+
<move tofile="${target.path}/${app.name}-web-rest/src/main/java/${app.group.id.dir}/${app.name}"
|
|
109
|
+
file="${target.path}/${app.name}-web-rest/src/main/java/myapp"/>
|
|
110
|
+
<mkdir dir="${target.path}/${app.name}-web-rest/src/test/java/${app.group.id.dir}/${app.name}"/>
|
|
111
|
+
|
|
112
|
+
</target>
|
|
113
|
+
|
|
114
|
+
</project>
|
|
115
|
+
|
|
Binary file
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
2
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
3
|
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
|
4
|
+
http://maven.apache.org/maven-v4_0_0.xsd">
|
|
5
|
+
|
|
6
|
+
<modelVersion>4.0.0</modelVersion>
|
|
7
|
+
<groupId>eu.europa.ec.digit.eui</groupId>
|
|
8
|
+
<artifactId>eui-cli-build</artifactId>
|
|
9
|
+
<version>0.1.0</version>
|
|
10
|
+
<packaging>pom</packaging>
|
|
11
|
+
|
|
12
|
+
<name>eUI CLI app generator</name>
|
|
13
|
+
|
|
14
|
+
<properties>
|
|
15
|
+
<src.path></src.path>
|
|
16
|
+
<target.path></target.path>
|
|
17
|
+
<app.group.id></app.group.id>
|
|
18
|
+
<app.artifact.id></app.artifact.id>
|
|
19
|
+
</properties>
|
|
20
|
+
|
|
21
|
+
<profiles>
|
|
22
|
+
<profile>
|
|
23
|
+
<id>build-web-spring-boot</id>
|
|
24
|
+
<build>
|
|
25
|
+
<plugins>
|
|
26
|
+
<plugin>
|
|
27
|
+
<groupId>org.apache.maven.plugins</groupId>
|
|
28
|
+
<artifactId>maven-antrun-plugin</artifactId>
|
|
29
|
+
<version>1.7</version>
|
|
30
|
+
<executions>
|
|
31
|
+
<execution>
|
|
32
|
+
<id>pre-install</id>
|
|
33
|
+
<phase>generate-sources</phase>
|
|
34
|
+
<configuration>
|
|
35
|
+
|
|
36
|
+
<target>
|
|
37
|
+
<ant dir="${basedir}" target="generate.web-spring-boot">
|
|
38
|
+
<property name="src.path" value="${src.path}"/>
|
|
39
|
+
<property name="target.path" value="${target.path}"/>
|
|
40
|
+
<property name="app.group.id" value="${app.group.id}"/>
|
|
41
|
+
<property name="app.artifact.id" value="${app.artifact.id}"/>
|
|
42
|
+
<property name="app.name" value="${app.artifact.id}"/>
|
|
43
|
+
</ant>
|
|
44
|
+
</target>
|
|
45
|
+
|
|
46
|
+
</configuration>
|
|
47
|
+
<goals>
|
|
48
|
+
<goal>run</goal>
|
|
49
|
+
</goals>
|
|
50
|
+
</execution>
|
|
51
|
+
</executions>
|
|
52
|
+
</plugin>
|
|
53
|
+
|
|
54
|
+
</plugins>
|
|
55
|
+
|
|
56
|
+
</build>
|
|
57
|
+
</profile>
|
|
58
|
+
</profiles>
|
|
59
|
+
|
|
60
|
+
</project>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|