Skip to content

Commit

Permalink
Refactor angular folders. Remove angular dependencies from root packa…
Browse files Browse the repository at this point in the history
…ge.json (#5643)

* Refactor angular folders. Remove angular dependencies from root package.json

* Remove all angular dependencies from root package.json
  • Loading branch information
dk981234 authored Feb 14, 2023
1 parent bf24f13 commit f398d04
Show file tree
Hide file tree
Showing 53 changed files with 39 additions and 75 deletions.
2 changes: 1 addition & 1 deletion build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ jobs:
displayName: "Build Angular"
- script: |
cd $(Build.SourcesDirectory)/survey-library/examples/angular-ui
cd $(Build.SourcesDirectory)/survey-library/packages/survey-angular-ui/example
npm install
displayName: "NPM install examples/angular-ui"
Expand Down
2 changes: 1 addition & 1 deletion devops-pull-requests-parallel-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ jobs:
displayName: "Build Angular"
- script: |
cd examples/angular-ui
cd packages/survey-angular-ui/example
npm install
displayName: "NPM install examples/angular-ui"
Expand Down
2 changes: 1 addition & 1 deletion devops-visual-regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ jobs:
displayName: "Build Angular"
- script: |
cd examples/angular-ui
cd packages/survey-angular-ui/example
npm install
displayName: "NPM install examples/angular-ui"
Expand Down
18 changes: 0 additions & 18 deletions examples/angular-ui/tsconfig.spec.json

This file was deleted.

24 changes: 5 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@
"visual-regression-tests": "testcafe chrome ./visualRegressionTests/ --app \"http-server\" --screenshots ./ --reporter minimal --selector-timeout 1500",
"visual-regression-tests:ci": "testcafe chrome:headless ./visualRegressionTests/ --app \"http-server\" --screenshots ./ --selector-timeout 1500 --reporter minimal,dashboard",
"visual-regression-tests:ci:knockout": "testcafe -c 4 -q chrome:headless ./visualRegressionTests/ --app \"http-server\" --screenshots ./ --selector-timeout 1500 --reporter minimal,dashboard --env=knockout",
"visual-regression-tests:ci:angular": "testcafe -c 4 -q chrome:headless ./visualRegressionTests/ --app \"http-server ./dist/angular-ui --proxy http://localhost:8080? -p 8080\" --screenshots ./ --selector-timeout 1500 --reporter minimal,dashboard --env=angular",
"visual-regression-tests:angular": "testcafe -c 4 -q chrome ./visualRegressionTests/ --app \"http-server ./dist/angular-ui --proxy http://localhost:8080? -p 8080\" --screenshots ./ --selector-timeout 1500 --reporter minimal,dashboard --env=angular",
"visual-regression-tests:ci:angular": "testcafe -c 4 -q chrome:headless ./visualRegressionTests/ --app \"http-server ./packages/survey-angular-ui/example/dist --proxy http://localhost:8080? -p 8080\" --screenshots ./ --selector-timeout 1500 --reporter minimal,dashboard --env=angular",
"visual-regression-tests:angular": "testcafe -c 4 -q chrome ./visualRegressionTests/ --app \"http-server ./packages/survey-angular-ui/example/dist --proxy http://localhost:8080? -p 8080\" --screenshots ./ --selector-timeout 1500 --reporter minimal,dashboard --env=angular",
"visual-regression-tests:ci:react": "testcafe -c 4 -q chrome:headless ./visualRegressionTests/ --app \"http-server\" --screenshots ./ --selector-timeout 1500 --reporter minimal,dashboard --env=react",
"visual-regression-tests:ci:vue": "testcafe -c 4 -q chrome:headless ./visualRegressionTests/ --app \"http-server\" --screenshots ./ --selector-timeout 1500 --reporter minimal,dashboard --env=vue",
"visual-regression-tests:file": "testcafe chrome:headless --app \"http-server\" ./visualRegressionTests/tests/defaultV2/paneldynamic.ts --screenshots ./ --reporter minimal --selector-timeout 1500",
"testcafe:angular": "testcafe chrome testCafe/ --app \"http-server ./dist/angular-ui --proxy http://localhost:8080? -p 8080\" --selector-timeout 1500 --reporter minimal,dashboard --env=angular",
"testcafe:ci:angular": "testcafe -c 4 -q chrome:headless testCafe/ --app \"http-server ./dist/angular-ui --proxy http://localhost:8080? -p 8080\" --selector-timeout 1500 --reporter minimal --env=angular",
"testcafe:angular": "testcafe chrome testCafe/ --app \"http-server ./packages/survey-angular-ui/example/dist --proxy http://localhost:8080? -p 8080\" --selector-timeout 1500 --reporter minimal,dashboard --env=angular",
"testcafe:ci:angular": "testcafe -c 4 -q chrome:headless testCafe/ --app \"http-server ./packages/survey-angular-ui/example/dist --proxy http://localhost:8080? -p 8080\" --selector-timeout 1500 --reporter minimal --env=angular",
"prepare": "husky install"
},
"version": "1.9.71",
Expand All @@ -85,16 +85,6 @@
"devDependencies": {
"downlevel-dts": "~0.11.0",
"@types/babel__traverse": "7.18.2",
"@angular-devkit/build-angular": "~13.0.0",
"@angular/cli": "~13.0.0",
"@angular/common": "~13.0.0",
"@angular/compiler": "~13.0.0",
"@angular/compiler-cli": "~13.0.0",
"@angular/core": "~13.0.0",
"@angular/forms": "~13.0.0",
"@angular/platform-browser": "~13.0.0",
"@angular/platform-browser-dynamic": "~13.0.0",
"@angular/cdk": "~13.0.0",
"@types/ace": "0.0.32",
"@types/angular": "^1.6.2",
"@types/jest": "23.3.3",
Expand Down Expand Up @@ -142,16 +132,13 @@
"madge": "^4.0.2",
"mini-css-extract-plugin": "^0.9.0",
"minimist": "^1.2.5",
"ng-packagr": "^13.0.0",
"node-uuid": "^1.4.8",
"postcss": "^8.4.0",
"puppeteer": "^1.19.0",
"qunit": "2.14.0",
"react": "17.0.1",
"react-dom": "17.0.1",
"replace-in-file": "^3.4.3",
"rimraf": "2.5.4",
"rxjs": "~6.6.0",
"sass": "^1",
"sass-loader": "^8.0.2",
"style-loader": "^1.2.1",
Expand Down Expand Up @@ -180,8 +167,7 @@
"webpack-dev-server": "^3.11.0",
"webpack-fix-style-only-entries": "^0.6.1",
"webpack-merge": "^5.7.3",
"webpack-svgstore-plugin": "4.0.1",
"zone.js": "~0.11.4"
"webpack-svgstore-plugin": "4.0.1"
},
"overrides": {
"karma-webpack": {
Expand Down
36 changes: 18 additions & 18 deletions packages/survey-angular-ui/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,25 @@
}
},
"root": "examples/angular-ui",
"sourceRoot": "../../examples/angular-ui/src",
"sourceRoot": "./example/src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "../../dist/angular-ui",
"index": "../../examples/angular-ui/src/index.html",
"main": "../../examples/angular-ui/src/main.ts",
"polyfills": "../../examples/angular-ui/src/polyfills.ts",
"outputPath": "./example/dist",
"index": "./example/src/index.html",
"main": "./example/src/main.ts",
"polyfills": "./example/src/polyfills.ts",
"tsConfig": "./tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
"../../examples/angular-ui/src/favicon.ico",
"../../examples/angular-ui/src/assets",
"../../examples/angular-ui/src/testCafe"
"./example/src/favicon.ico",
"./example/src/assets",
"./example/src/testCafe"
],
"styles": [
"../../examples/angular-ui/src/styles.scss",
"./example/src/styles.scss",
"../../build/survey-core/defaultV2.css"
],
"scripts": []
Expand All @@ -84,8 +84,8 @@
],
"fileReplacements": [
{
"replace": "../../examples/angular-ui/src/environments/environment.ts",
"with": "../../examples/angular-ui/src/environments/environment.prod.ts"
"replace": "./example/src/environments/environment.ts",
"with": "./example/src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
Expand Down Expand Up @@ -122,17 +122,17 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "../../examples/angular-ui/src/test.ts",
"polyfills": "../../examples/angular-ui/src/polyfills.ts",
"tsConfig": "../../examples/angular-ui/tsconfig.spec.json",
"karmaConfig": "../../examples/angular-ui/karma.conf.js",
"main": "./example/src/test.ts",
"polyfills": "./example/src/polyfills.ts",
"tsConfig": "./example/tsconfig.spec.json",
"karmaConfig": "./example/karma.conf.js",
"inlineStyleLanguage": "scss",
"assets": [
"../../examples/angular-ui/src/favicon.ico",
"../../examples/angular-ui/src/assets"
"./example/src/favicon.ico",
"./example/src/assets"
],
"styles": [
"../../examples/angular-ui/src/styles.scss"
"./example/src/styles.scss"
],
"scripts": []
}
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
{
"name": "survey-angular-ui-example",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^13.0.0",
"@angular/forms": "^13.0.0",
"@angular/core": "^13.0.0",
"@angular/cdk": "^13.0.0"
},
"peerDependencies": {},
"devDependencies": {
"@types/node": "^16.11.10"
},
"dependencies": {
"@angular/router": "^13.0.0",
"bootstrap": "^3.3.7",
"survey-core": "../../build/survey-core",
"survey-core": "../../../build/survey-core",
"surveyjs-widgets": "^1.9.40",
"tslib": "^2.3.0"
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/survey-angular-ui/ng-package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../build/survey-angular-ui",
"dest": "./build",
"lib": {
"entryFile": "src/angular-ui.ts"
}
Expand Down
6 changes: 4 additions & 2 deletions packages/survey-angular-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@angular/compiler": "~13.0.0",
"@angular/compiler-cli": "~13.0.0",
"@angular/core": "~13.0.0",
"@angular/cdk": "~13.0.0",
"@angular/forms": "~13.0.0",
"@angular/platform-browser": "~13.0.0",
"@angular/platform-browser-dynamic": "~13.0.0",
Expand All @@ -52,10 +53,11 @@
"survey-core": "../../build/survey-core",
"tslib": "^2.3.0",
"typescript": "~4.4.3",
"zone.js": "~0.11.4"
"zone.js": "~0.11.4",
"copyfiles": "~2.4.1"
},
"scripts": {
"build": "ng build",
"build": "ng build && npx copyfiles -u 1 \"build/**/*\" ../../build/survey-angular-ui",
"serve:example": "ng serve",
"build:example": "ng build --aot --output-hashing=none angular-ui",
"test": "ng test survey-angular-ui",
Expand Down
9 changes: 4 additions & 5 deletions packages/survey-angular-ui/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../build/angular-ui",
"outDir": "./example/dist/angular-ui",
"baseUrl": ".",
"noImplicitAny": false,
"types": [
Expand All @@ -13,14 +13,13 @@
"../../build/survey-core"
],
"survey-angular-ui": [
"../../build/survey-angular-ui/survey-angular-ui",
"../../build/survey-angular-ui"
"./build"
]
}
},
"files": [
"../../examples/angular-ui/src/main.ts",
"../../examples/angular-ui/src/polyfills.ts",
"./example/src/main.ts",
"./example/src/polyfills.ts",
],
"include": [
"src/**/*.d.ts"
Expand Down
2 changes: 1 addition & 1 deletion packages/survey-angular-ui/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions:": {
"outDir": "../../build/survey-angular-ui",
"outDir": "./build",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
Expand Down
2 changes: 1 addition & 1 deletion visual-regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ jobs:
displayName: "Build Angular"
- script: |
cd examples/angular-ui
cd packages/survey-angular-ui/example
npm install
displayName: "NPM install examples/angular-ui"
Expand Down

0 comments on commit f398d04

Please sign in to comment.