Skip to content

Commit 1fbd524

Browse files
committed
refactor: move to workspace
1 parent 2e7ba62 commit 1fbd524

33 files changed

+72
-180
lines changed

examples/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Example Projects
2+
3+
This folder holds an [Angular CLI](https://github.com/angular/angular-cli) workspace with sample projects from the Kendo UI for Angular [documentation](http://www.telerik.com/kendo-angular-ui/components).
4+
5+
Also, check out the [Standalone Examples](../examples-standalone)
6+
7+
## Starting Sample Projects
8+
9+
To run the sample projects, change into the `projects/<project name>` folder and run `npm start`. Alternatively, run `ng serve <project name>`.
10+
11+
Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
12+
13+
## Creating a New Sample Project
14+
15+
Use `ng generate application <application-name>` to create a new sample application.
16+
17+
## Further help
18+
19+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

sample-apps/pdf-export/embedded-fonts/angular.json renamed to examples/angular.json

Lines changed: 27 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,30 @@
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
6-
"embedded-fonts": {
7-
"root": "",
8-
"sourceRoot": "src",
6+
"pdf-embedded-fonts": {
7+
"root": "projects/pdf-embedded-fonts/",
8+
"sourceRoot": "projects/pdf-embedded-fonts/src",
99
"projectType": "application",
1010
"prefix": "app",
11-
"schematics": {
12-
"@schematics/angular:component": {
13-
"style": "sass"
14-
}
15-
},
11+
"schematics": {},
1612
"architect": {
1713
"build": {
1814
"builder": "@angular-devkit/build-angular:browser",
1915
"options": {
20-
"outputPath": "dist/embedded-fonts",
21-
"index": "src/index.html",
22-
"main": "src/main.ts",
23-
"polyfills": "src/polyfills.ts",
24-
"tsConfig": "src/tsconfig.app.json",
16+
"outputPath": "dist/pdf-embedded-fonts",
17+
"index": "projects/pdf-embedded-fonts/src/index.html",
18+
"main": "projects/pdf-embedded-fonts/src/main.ts",
19+
"polyfills": "projects/pdf-embedded-fonts/src/polyfills.ts",
20+
"tsConfig": "projects/pdf-embedded-fonts/tsconfig.app.json",
2521
"assets": [
26-
"src/favicon.ico",
27-
"src/assets"
22+
"projects/pdf-embedded-fonts/src/favicon.ico",
23+
"projects/pdf-embedded-fonts/src/assets"
2824
],
2925
"styles": [
3026
{
3127
"input": "node_modules/@progress/kendo-theme-default/dist/all.css"
3228
},
33-
"src/styles.scss"
29+
"projects/pdf-embedded-fonts/src/styles.scss"
3430
],
3531
"scripts": [],
3632
"es5BrowserSupport": true
@@ -39,8 +35,8 @@
3935
"production": {
4036
"fileReplacements": [
4137
{
42-
"replace": "src/environments/environment.ts",
43-
"with": "src/environments/environment.prod.ts"
38+
"replace": "projects/pdf-embedded-fonts/src/environments/environment.ts",
39+
"with": "projects/pdf-embedded-fonts/src/environments/environment.prod.ts"
4440
}
4541
],
4642
"optimization": true,
@@ -65,82 +61,54 @@
6561
"serve": {
6662
"builder": "@angular-devkit/build-angular:dev-server",
6763
"options": {
68-
"browserTarget": "embedded-fonts:build"
64+
"browserTarget": "pdf-embedded-fonts:build"
6965
},
7066
"configurations": {
7167
"production": {
72-
"browserTarget": "embedded-fonts:build:production"
68+
"browserTarget": "pdf-embedded-fonts:build:production"
7369
}
7470
}
7571
},
7672
"extract-i18n": {
7773
"builder": "@angular-devkit/build-angular:extract-i18n",
7874
"options": {
79-
"browserTarget": "embedded-fonts:build"
75+
"browserTarget": "pdf-embedded-fonts:build"
8076
}
8177
},
8278
"test": {
8379
"builder": "@angular-devkit/build-angular:karma",
8480
"options": {
85-
"main": "src/test.ts",
86-
"polyfills": "src/polyfills.ts",
87-
"tsConfig": "src/tsconfig.spec.json",
88-
"karmaConfig": "src/karma.conf.js",
81+
"main": "projects/pdf-embedded-fonts/src/test.ts",
82+
"polyfills": "projects/pdf-embedded-fonts/src/polyfills.ts",
83+
"tsConfig": "projects/pdf-embedded-fonts/tsconfig.spec.json",
84+
"karmaConfig": "projects/pdf-embedded-fonts/karma.conf.js",
8985
"styles": [
9086
{
9187
"input": "node_modules/@progress/kendo-theme-default/dist/all.css"
9288
},
93-
"src/styles.scss"
89+
"projects/pdf-embedded-fonts/src/styles.scss"
9490
],
9591
"scripts": [],
9692
"assets": [
97-
"src/favicon.ico",
98-
"src/assets"
93+
"projects/pdf-embedded-fonts/src/favicon.ico",
94+
"projects/pdf-embedded-fonts/src/assets"
9995
]
10096
}
10197
},
10298
"lint": {
10399
"builder": "@angular-devkit/build-angular:tslint",
104100
"options": {
105101
"tsConfig": [
106-
"src/tsconfig.app.json",
107-
"src/tsconfig.spec.json"
102+
"projects/pdf-embedded-fonts/tsconfig.app.json",
103+
"projects/pdf-embedded-fonts/tsconfig.spec.json"
108104
],
109105
"exclude": [
110106
"**/node_modules/**"
111107
]
112108
}
113109
}
114110
}
115-
},
116-
"embedded-fonts-e2e": {
117-
"root": "e2e/",
118-
"projectType": "application",
119-
"prefix": "",
120-
"architect": {
121-
"e2e": {
122-
"builder": "@angular-devkit/build-angular:protractor",
123-
"options": {
124-
"protractorConfig": "e2e/protractor.conf.js",
125-
"devServerTarget": "embedded-fonts:serve"
126-
},
127-
"configurations": {
128-
"production": {
129-
"devServerTarget": "embedded-fonts:serve:production"
130-
}
131-
}
132-
},
133-
"lint": {
134-
"builder": "@angular-devkit/build-angular:tslint",
135-
"options": {
136-
"tsConfig": "e2e/tsconfig.e2e.json",
137-
"exclude": [
138-
"**/node_modules/**"
139-
]
140-
}
141-
}
142-
}
143111
}
144112
},
145-
"defaultProject": "embedded-fonts"
113+
"defaultProject": "pdf-embedded-fonts"
146114
}

examples/bin/serve-project.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env node
2+
3+
const path = require('path');
4+
const { execSync } = require('child_process');
5+
6+
const cwd = process.env.INIT_CWD;
7+
let projectName = path.relative('projects', cwd);
8+
9+
if (projectName === '..') {
10+
projectName = '';
11+
}
12+
13+
const args = `serve ${projectName}`;
14+
execSync(`npm run ng ${args}`, { stdio: 'inherit', windowsHide: true });

sample-apps/pdf-export/embedded-fonts/package.json renamed to examples/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "embedded-fonts",
2+
"name": "examples",
33
"version": "0.0.0",
44
"scripts": {
55
"ng": "ng",
6-
"start": "ng serve",
6+
"start": "./bin/serve-project.js",
77
"build": "ng build",
88
"test": "ng test",
99
"lint": "ng lint",

sample-apps/pdf-export/embedded-fonts/src/browserslist renamed to examples/projects/pdf-embedded-fonts/browserslist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
last 2 versions
99
Firefox ESR
1010
not dead
11-
not IE 9-11
11+
IE 9-11

sample-apps/pdf-export/embedded-fonts/src/karma.conf.js renamed to examples/projects/pdf-embedded-fonts/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = function (config) {
1616
clearContext: false // leave Jasmine Spec Runner output visible in browser
1717
},
1818
coverageIstanbulReporter: {
19-
dir: require('path').join(__dirname, '../coverage/embedded-fonts'),
19+
dir: require('path').join(__dirname, '../../coverage/pdf-embedded-fonts'),
2020
reports: ['html', 'lcovonly', 'text-summary'],
2121
fixWebpackSourcePaths: true
2222
},

0 commit comments

Comments
 (0)