Skip to content

Commit

Permalink
chore: add angular sample
Browse files Browse the repository at this point in the history
Introduces an Angular sample for easy integration of pillarbox as a reusable component,
providing a practical starting point for integrators.
  • Loading branch information
jboix committed Mar 18, 2024
1 parent 702a8a8 commit 77ee9a2
Show file tree
Hide file tree
Showing 24 changed files with 12,047 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ insert_final_newline=true
indent_style=space
indent_size=2

[{*.ts,*.js}]
[{*.ts,*.js,*.jsx,*.tsx}]
quote_type=single

[*.md]
Expand Down
7 changes: 7 additions & 0 deletions samples/angular/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings
27 changes: 27 additions & 0 deletions samples/angular/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# pillarbox-web angular sample

This project demonstrates the integration og pillarbox with angular. Feel free to explore and
experiment with this sample via the following playground:

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)][stackblitz]

You can also use this project as a template.

## Quick guide

This project uses [Angular CLI][angular.cli] for building and previewing the example. The following
commands are available:

- Run the server in development mode.
```shell
npm run dev
```

- Compile Typescript and build the project.
```shell
npm run build
```

[stackblitz]: https://stackblitz.com/github/srgssr/pillarbox-web-demo/tree/main/samples/angular

[angular]:https://angular.io/cli
107 changes: 107 additions & 0 deletions samples/angular/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"angular": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"inlineTemplate": true,
"inlineStyle": true,
"skipTests": true
},
"@schematics/angular:class": {
"skipTests": true
},
"@schematics/angular:directive": {
"skipTests": true
},
"@schematics/angular:guard": {
"skipTests": true
},
"@schematics/angular:interceptor": {
"skipTests": true
},
"@schematics/angular:pipe": {
"skipTests": true
},
"@schematics/angular:resolver": {
"skipTests": true
},
"@schematics/angular:service": {
"skipTests": true
}
},
"root": "",
"sourceRoot": "src",
"prefix": "pb",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/angular",
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"outputHashing": "all"
},
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"buildTarget": "angular:build:production"
},
"development": {
"buildTarget": "angular:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "angular:build"
}
}
}
}
},
"cli": {
"analytics": false
}
}
Loading

0 comments on commit 77ee9a2

Please sign in to comment.