Angular app
+Angular app with Aero components and styles
+ ++
+ +
- -
diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index ad06716..0000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "ng-demo"] - path = sae-airwatch - url = https://source.cipherbliss.com/tykayn/ng-demo - branch = dev diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 4434677..0000000 --- a/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -# lancer le build: -# docker build -f /home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation/Dockerfile -t csc-app:latest /home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation# -FROM node:24 AS build -WORKDIR /app - -# Étape 1: préparer le cache d'installation -# On copie d'abord uniquement les manifests pour optimiser le cache Docker -COPY my-workspace/package.json my-workspace/package-lock.json* ./my-workspace/ -COPY sae-csc/package.json sae-csc/package-lock.json* ./sae-csc/ - -# Installer les dépendances de la workspace qui contient la librairie -WORKDIR /app/my-workspace -RUN npm i - -# Copier l'intégralité des sources de la workspace et builder la librairie "sae-lib" -COPY my-workspace/ ./ -RUN npx ng build sae-lib - -# Installer les dépendances de l'application (qui dépend de ../my-workspace/dist/sae-lib) -WORKDIR /app/sae-csc -RUN npm i - -# Copier le reste des sources de l'application -COPY sae-csc/ ./ - -# lancer en mode dev et exposer le port 4200 -EXPOSE 4200 - -# Lancer le serveur Angular en écoutant sur toutes les interfaces -CMD ["npm","start","--","--host","0.0.0.0"] \ No newline at end of file diff --git a/angular-basic/.gitignore b/angular-basic/.gitignore index cc7b141..2d02efe 100644 --- a/angular-basic/.gitignore +++ b/angular-basic/.gitignore @@ -40,3 +40,5 @@ testem.log # System files .DS_Store Thumbs.db + +sae-lib diff --git a/angular-basic/Dockerfile b/angular-basic/Dockerfile new file mode 100644 index 0000000..6efd472 --- /dev/null +++ b/angular-basic/Dockerfile @@ -0,0 +1,53 @@ +# --- Build stage --- ## Forcing rebuild 1 + +FROM node:24 AS build + +WORKDIR /app + +# Copier l'application Angular et la librairie locale +# On attend un contexte de build à la racine du repo pour inclure my-workspace +COPY angular-basic /app/angular-basic +COPY my-workspace /app/my-workspace + +# Définir le répertoire de travail sur l'application +WORKDIR /app/angular-basic + +RUN echo "============= run setup script " + +RUN ./setup.sh + +# Construire le projet Angular (production) + +RUN npm run build + +# --- Production stage --- + +FROM nginx:1.27-alpine AS production + +#RUN apk add --no-cache bash nano wget + +# Nettoyer les fichiers nginx par défaut + +RUN rm -rf /usr/share/nginx/html/* + +# Copier la sortie du build (on testera le bon chemin ensuite) + +#COPY --from=build /app/dist /usr/share/nginx/html + +COPY --from=build /app/angular-basic/dist/angular-basic/browser/* /usr/share/nginx/html + +RUN echo "============= liste des fichiers dans nginx html" + +RUN ls -l "/usr/share/nginx/html" + +RUN echo "=============" + +# 🔹 Exposer le port par défaut d'nginx (80) +EXPOSE 80 + +HEALTHCHECK --interval=30s --timeout=10s --retries=3 \ +CMD wget -qO- http://localhost:80/ || exit 1 + +RUN echo "servir le front static CSC: done." + +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/angular-basic/my-workspace/README.md b/angular-basic/my-workspace/README.md new file mode 100644 index 0000000..207be36 --- /dev/null +++ b/angular-basic/my-workspace/README.md @@ -0,0 +1,3 @@ +# SAE Design system + +Le design system Aero utilisé pour les chatbots de la maison. diff --git a/angular-basic/my-workspace/angular.json b/angular-basic/my-workspace/angular.json new file mode 100644 index 0000000..ddf0500 --- /dev/null +++ b/angular-basic/my-workspace/angular.json @@ -0,0 +1,78 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "sae-lib": { + "projectType": "library", + "root": "projects/sae-lib", + "sourceRoot": "projects/sae-lib/src", + "prefix": "sae", + "architect": { + "build": { + "builder": "@angular/build:ng-packagr", + "configurations": { + "production": { + "tsConfig": "projects/sae-lib/tsconfig.lib.prod.json" + }, + "development": { + "tsConfig": "projects/sae-lib/tsconfig.lib.json" + } + }, + "defaultConfiguration": "production" + }, + "test": { + "builder": "@angular/build:karma", + "options": { + "tsConfig": "projects/sae-lib/tsconfig.spec.json" + } + }, + "lint": { + "builder": "@angular-eslint/builder:lint", + "options": { + "lintFilePatterns": [ + "projects/sae-lib/**/*.ts", + "projects/sae-lib/**/*.html" + ], + "eslintConfig": "projects/sae-lib/eslint.config.js" + } + }, + "storybook": { + "builder": "@storybook/angular:start-storybook", + "options": { + "configDir": "projects/sae-lib/.storybook", + "browserTarget": "sae-lib:build", + "compodoc": true, + "compodocArgs": [ + "-e", + "json", + "-d", + "projects/sae-lib" + ], + "port": 6006 + } + }, + "build-storybook": { + "builder": "@storybook/angular:build-storybook", + "options": { + "configDir": "projects/sae-lib/.storybook", + "browserTarget": "sae-lib:build", + "compodoc": true, + "compodocArgs": [ + "-e", + "json", + "-d", + "projects/sae-lib" + ], + "outputDir": "storybook-static" + } + } + } + } + }, + "cli": { + "schematicCollections": [ + "angular-eslint" + ] + } +} \ No newline at end of file diff --git a/angular-basic/my-workspace/dist/sae-lib/.npmignore b/angular-basic/my-workspace/dist/sae-lib/.npmignore new file mode 100644 index 0000000..c97ccf2 --- /dev/null +++ b/angular-basic/my-workspace/dist/sae-lib/.npmignore @@ -0,0 +1,2 @@ +# Nested package.json's are only needed for development. +**/package.json \ No newline at end of file diff --git a/angular-basic/my-workspace/dist/sae-lib/README.md b/angular-basic/my-workspace/dist/sae-lib/README.md new file mode 100644 index 0000000..fe8de2f --- /dev/null +++ b/angular-basic/my-workspace/dist/sae-lib/README.md @@ -0,0 +1,64 @@ +# SaeLib + +This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.1.0. + +## Code scaffolding + +Angular CLI includes powerful code scaffolding tools. To generate a new component, run: + +```bash +ng generate component component-name +``` + +For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run: + +```bash +ng generate --help +``` + +## Building + +To build the library, run: + +```bash +ng build sae-lib +``` + +This command will compile your project, and the build artifacts will be placed in the `dist/` directory. + +### Publishing the Library + +Once the project is built, you can publish your library by following these steps: + +1. Navigate to the `dist` directory: + ```bash + cd dist/sae-lib + ``` + +2. Run the `npm publish` command to publish your library to the npm registry: + ```bash + npm publish + ``` + +## Running unit tests + +To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command: + +```bash +ng test +``` + +## Running end-to-end tests + +For end-to-end (e2e) testing, run: + +```bash +ng e2e +``` + +Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs. + +## Additional Resources + +For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page. + diff --git a/angular-basic/my-workspace/dist/sae-lib/fesm2022/sae-lib.mjs b/angular-basic/my-workspace/dist/sae-lib/fesm2022/sae-lib.mjs new file mode 100644 index 0000000..bc16f55 --- /dev/null +++ b/angular-basic/my-workspace/dist/sae-lib/fesm2022/sae-lib.mjs @@ -0,0 +1,30 @@ +import * as i0 from '@angular/core'; +import { Component } from '@angular/core'; + +class SaeLib { + static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: SaeLib, deps: [], target: i0.ɵɵFactoryTarget.Component }); + static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: SaeLib, isStandalone: true, selector: "lib-sae-lib", ngImport: i0, template: ` +
+ sae-lib works! +
+ `, isInline: true, styles: [""] }); +} +i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: SaeLib, decorators: [{ + type: Component, + args: [{ selector: 'lib-sae-lib', imports: [], template: ` ++ sae-lib works! +
+ ` }] + }] }); + +/* + * Public API Surface of sae-lib + */ + +/** + * Generated bundle index. Do not edit. + */ + +export { SaeLib }; +//# sourceMappingURL=sae-lib.mjs.map diff --git a/angular-basic/my-workspace/dist/sae-lib/fesm2022/sae-lib.mjs.map b/angular-basic/my-workspace/dist/sae-lib/fesm2022/sae-lib.mjs.map new file mode 100644 index 0000000..d632964 --- /dev/null +++ b/angular-basic/my-workspace/dist/sae-lib/fesm2022/sae-lib.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"sae-lib.mjs","sources":["../../../projects/sae-lib/src/lib/sae-lib.ts","../../../projects/sae-lib/src/public-api.ts","../../../projects/sae-lib/src/sae-lib.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-sae-lib',\n imports: [],\n template: `\n\n sae-lib works!\n
\n `,\n styles: ``\n})\nexport class SaeLib {\n\n}\n","/*\n * Public API Surface of sae-lib\n */\n\nexport * from './lib/sae-lib';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAYa,MAAM,CAAA;uGAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAN,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAM,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAPP;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAGU,MAAM,EAAA,UAAA,EAAA,CAAA;kBAVlB,SAAS;+BACE,aAAa,EAAA,OAAA,EACd,EAAE,EAAA,QAAA,EACD;;;;AAIT,EAAA,CAAA,EAAA;;;ACTH;;AAEG;;ACFH;;AAEG;;;;"} \ No newline at end of file diff --git a/angular-basic/my-workspace/dist/sae-lib/index.d.ts b/angular-basic/my-workspace/dist/sae-lib/index.d.ts new file mode 100644 index 0000000..56230b0 --- /dev/null +++ b/angular-basic/my-workspace/dist/sae-lib/index.d.ts @@ -0,0 +1,8 @@ +import * as i0 from '@angular/core'; + +declare class SaeLib { + static ɵfac: i0.ɵɵFactoryDeclaration
-
- |
-
-
|
-