Skip to content

Commit 777af7d

Browse files
feat: Init repo
1 parent 2ebc671 commit 777af7d

25 files changed

+14734
-0
lines changed

.editorconfig

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
ij_typescript_use_double_quotes = false
14+
15+
[*.md]
16+
max_line_length = off
17+
trim_trailing_whitespace = false

.gitignore

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/customPage
6+
/tmp
7+
/out-tsc
8+
/bazel-out
9+
10+
# Node
11+
/node_modules
12+
npm-debug.log
13+
yarn-error.log
14+
15+
# IDEs and editors
16+
.idea/
17+
.project
18+
.classpath
19+
.c9/
20+
*.launch
21+
.settings/
22+
*.sublime-workspace
23+
24+
# Visual Studio Code
25+
.vscode/*
26+
!.vscode/settings.json
27+
!.vscode/tasks.json
28+
!.vscode/launch.json
29+
!.vscode/extensions.json
30+
.history/*
31+
32+
# Miscellaneous
33+
/.angular/cache
34+
.sass-cache/
35+
/connect.lock
36+
/coverage
37+
/libpeerconnection.log
38+
testem.log
39+
/typings
40+
41+
# System files
42+
.DS_Store
43+
Thumbs.db

.vscode/extensions.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3+
"recommendations": ["angular.ng-template"]
4+
}

.vscode/launch.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"name": "ng serve",
7+
"type": "chrome",
8+
"request": "launch",
9+
"preLaunchTask": "npm: start",
10+
"url": "http://localhost:4200/"
11+
},
12+
{
13+
"name": "ng test",
14+
"type": "chrome",
15+
"request": "launch",
16+
"preLaunchTask": "npm: test",
17+
"url": "http://localhost:9876/debug.html"
18+
}
19+
]
20+
}

.vscode/tasks.json

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
3+
"version": "2.0.0",
4+
"tasks": [
5+
{
6+
"type": "npm",
7+
"script": "start",
8+
"isBackground": true,
9+
"problemMatcher": {
10+
"owner": "typescript",
11+
"pattern": "$tsc",
12+
"background": {
13+
"activeOnStart": true,
14+
"beginsPattern": {
15+
"regexp": "(.*?)"
16+
},
17+
"endsPattern": {
18+
"regexp": "bundle generation complete"
19+
}
20+
}
21+
}
22+
},
23+
{
24+
"type": "npm",
25+
"script": "test",
26+
"isBackground": true,
27+
"problemMatcher": {
28+
"owner": "typescript",
29+
"pattern": "$tsc",
30+
"background": {
31+
"activeOnStart": true,
32+
"beginsPattern": {
33+
"regexp": "(.*?)"
34+
},
35+
"endsPattern": {
36+
"regexp": "bundle generation complete"
37+
}
38+
}
39+
}
40+
}
41+
]
42+
}

Bonita.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# How to import a Angular Application as a Bonita Custom Page
2+
3+
4+
## Bonita update needed
5+
6+
We need to remove the `browser` folder in `dist` to be allow to serve the application.
7+
Do do it, in `angular.json`, replace in `architect > build > options`:
8+
``` json
9+
"outputPath": "dist/my-angular-app",
10+
```
11+
with
12+
``` json
13+
"outputPath": {
14+
"base": "dist/resources",
15+
"browser": "",
16+
"media": "assets"
17+
}
18+
```
19+
20+
## Add a page.properties
21+
22+
In a `resources` folder, create a `page.properties` file and add this content (you need to update each entry to feat yours needs).
23+
24+
```
25+
name=custompage_myAngularApp
26+
displayName=Angular App example
27+
descritpion=This page is developed in Angular; it can be exported to an IDE to be edited, but not in Bonita UI Designedescription.
28+
resources=[]
29+
contentType=page
30+
```
31+
32+
More details on this [official documentation page](https://documentation.bonitasoft.com/bonita/latest/pages-and-forms/pages-development)
33+
34+
## Create a custom page bundle
35+
36+
After run the `npm run build` command. You can execute the `scripts/createCustomePage.js` script.
37+
38+
It will:
39+
* Retrieve the `name` specify in `package.json`
40+
* Copy `page.properties` to ``dist` folder
41+
* Create a `zip` which contains the `dist` folder in a `customPage` folder
42+
43+
44+
> [!TIP]
45+
> To test if the dist folder is compatible with a Bonita custom page, you can try to run **npx http-server dist/resources** (adapt the dist/resources path depending of where to execute the command line)
46+
47+
## Import the page in Bonita
48+
49+
Go in the `admin application` in `resources` tab.
50+
51+
Import the custom page generated on previous section
52+
53+
Map this page to an application
54+
55+
Open the application and you will see your angular page application

README.md

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# MyAngularApp
2+
3+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.1.5.
4+
5+
6+
## Bonita specific
7+
8+
If you want to deploy this angular application as a Bonita custom page, you can follow [this files](Bonita.md).
9+
10+
## Development server
11+
12+
To start a local development server, run:
13+
14+
```bash
15+
ng serve
16+
```
17+
18+
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
19+
20+
## Code scaffolding
21+
22+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
23+
24+
```bash
25+
ng generate component component-name
26+
```
27+
28+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
29+
30+
```bash
31+
ng generate --help
32+
```
33+
34+
## Building
35+
36+
To build the project run:
37+
38+
```bash
39+
ng build
40+
```
41+
42+
This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
43+
44+
## Running unit tests
45+
46+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
47+
48+
```bash
49+
ng test
50+
```
51+
52+
## Running end-to-end tests
53+
54+
For end-to-end (e2e) testing, run:
55+
56+
```bash
57+
ng e2e
58+
```
59+
60+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
61+
62+
## Additional Resources
63+
64+
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.

angular.json

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"my-angular-app": {
7+
"projectType": "application",
8+
"schematics": {},
9+
"root": "",
10+
"sourceRoot": "src",
11+
"prefix": "app",
12+
"architect": {
13+
"build": {
14+
"builder": "@angular-devkit/build-angular:application",
15+
"options": {
16+
"outputPath": {
17+
"base": "dist/resources",
18+
"browser": "",
19+
"media": "assets"
20+
},
21+
"index": "src/index.html",
22+
"browser": "src/main.ts",
23+
"polyfills": [
24+
"zone.js"
25+
],
26+
"tsConfig": "tsconfig.app.json",
27+
"assets": [
28+
{
29+
"glob": "**/*",
30+
"input": "public"
31+
}
32+
],
33+
"styles": [
34+
"src/styles.css"
35+
],
36+
"scripts": []
37+
},
38+
"configurations": {
39+
"production": {
40+
"budgets": [
41+
{
42+
"type": "initial",
43+
"maximumWarning": "500kB",
44+
"maximumError": "1MB"
45+
},
46+
{
47+
"type": "anyComponentStyle",
48+
"maximumWarning": "4kB",
49+
"maximumError": "8kB"
50+
}
51+
],
52+
"outputHashing": "all"
53+
},
54+
"development": {
55+
"optimization": false,
56+
"extractLicenses": false,
57+
"sourceMap": true
58+
}
59+
},
60+
"defaultConfiguration": "production"
61+
},
62+
"serve": {
63+
"builder": "@angular-devkit/build-angular:dev-server",
64+
"configurations": {
65+
"production": {
66+
"buildTarget": "my-angular-app:build:production"
67+
},
68+
"development": {
69+
"buildTarget": "my-angular-app:build:development"
70+
}
71+
},
72+
"defaultConfiguration": "development"
73+
},
74+
"extract-i18n": {
75+
"builder": "@angular-devkit/build-angular:extract-i18n"
76+
},
77+
"test": {
78+
"builder": "@angular-devkit/build-angular:karma",
79+
"options": {
80+
"polyfills": [
81+
"zone.js",
82+
"zone.js/testing"
83+
],
84+
"tsConfig": "tsconfig.spec.json",
85+
"assets": [
86+
{
87+
"glob": "**/*",
88+
"input": "public"
89+
}
90+
],
91+
"styles": [
92+
"src/styles.css"
93+
],
94+
"scripts": []
95+
}
96+
}
97+
}
98+
}
99+
}
100+
}

0 commit comments

Comments
 (0)