Skip to content

Commit

Permalink
Add Angular examples with standalone components (#21)
Browse files Browse the repository at this point in the history
* Add Angular examples with standalone components

* Update check-build.xml

* Increase budgets
  • Loading branch information
RomanTsukanov authored Jul 8, 2024
1 parent 043306a commit dda8cbd
Show file tree
Hide file tree
Showing 57 changed files with 26,330 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/check-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,26 @@ jobs:
npm install
npm run build
- name: Build get-started-library/angular-standalone-components
run: |
cd get-started-library/angular-standalone-components
npm install
npm run build
if: ${{ matrix.node-version != '16.x' }}

- name: Build get-started-creator/angular
run: |
cd get-started-creator/angular
npm install
npm run build
- name: Build get-started-creator/angular-standalone-components
run: |
cd get-started-creator/angular-standalone-components
npm install
npm run build
if: ${{ matrix.node-version != '16.x' }}

- name: Build get-started-analytics/angular
run: |
cd get-started-analytics/angular
Expand Down
16 changes: 16 additions & 0 deletions get-started-creator/angular-standalone-components/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
42 changes: 42 additions & 0 deletions get-started-creator/angular-standalone-components/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.

# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# Node
/node_modules
npm-debug.log
yarn-error.log

# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings

# System files
.DS_Store
Thumbs.db
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": ["angular.ng-template"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http://localhost:9876/debug.html"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "start",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
},
{
"type": "npm",
"script": "test",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
}
]
}
14 changes: 14 additions & 0 deletions get-started-creator/angular-standalone-components/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Get Started with SurveyJS Form Builder for Angular Using Standalone Components

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.8 and contains a demo example that shows how to quickly integrate [SurveyJS Form Builder](https://surveyjs.io/survey-creator/documentation/overview) into an Angular application using standalone components. Refer to the files in the [src/app/survey-creator](src/app/survey-creator) directory for full code listings.

## Development Server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.

## SurveyJS Resources

- [Website](https://surveyjs.io/)
- [Documentation](https://surveyjs.io/form-library/documentation/overview)
- [Starter Demos](https://surveyjs.io/form-library/examples/overview)
- [What's New](https://surveyjs.io/stay-updated/major-updates/2023)
95 changes: 95 additions & 0 deletions get-started-creator/angular-standalone-components/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"surveyjs-form-builder-angular-standalone-components": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/surveyjs-form-builder-angular-standalone-components",
"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": "3mb",
"maximumError": "3mb"
},
{
"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": "surveyjs-form-builder-angular-standalone-components:build:production"
},
"development": {
"buildTarget": "surveyjs-form-builder-angular-standalone-components:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "surveyjs-form-builder-angular-standalone-components:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"tsConfig": "tsconfig.spec.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
}
}
}
}
}
}
Loading

0 comments on commit dda8cbd

Please sign in to comment.