Skip to content

Commit e813bee

Browse files
Files added.
0 parents  commit e813bee

32 files changed

+856
-0
lines changed

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# MyGridApp
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.8.
4+
5+
## Development server
6+
7+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8+
9+
## Code scaffolding
10+
11+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12+
13+
## Build
14+
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
16+
17+
## Running unit tests
18+
19+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20+
21+
## Running end-to-end tests
22+
23+
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
24+
25+
## Further help
26+
27+
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).

angular.json

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"my-grid-app": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"prefix": "app",
11+
"schematics": {},
12+
"architect": {
13+
"build": {
14+
"builder": "@angular-devkit/build-angular:browser",
15+
"options": {
16+
"outputPath": "dist/my-grid-app",
17+
"index": "src/index.html",
18+
"main": "src/main.ts",
19+
"polyfills": "src/polyfills.ts",
20+
"tsConfig": "src/tsconfig.app.json",
21+
"assets": [
22+
"src/favicon.ico",
23+
"src/assets"
24+
],
25+
"styles": [
26+
"src/styles.css",
27+
"./node_modules/@syncfusion/ej2-material-theme/styles/material.css"
28+
],
29+
"scripts": [],
30+
"es5BrowserSupport": true
31+
},
32+
"configurations": {
33+
"production": {
34+
"fileReplacements": [
35+
{
36+
"replace": "src/environments/environment.ts",
37+
"with": "src/environments/environment.prod.ts"
38+
}
39+
],
40+
"optimization": true,
41+
"outputHashing": "all",
42+
"sourceMap": false,
43+
"extractCss": true,
44+
"namedChunks": false,
45+
"aot": true,
46+
"extractLicenses": true,
47+
"vendorChunk": false,
48+
"buildOptimizer": true,
49+
"budgets": [
50+
{
51+
"type": "initial",
52+
"maximumWarning": "2mb",
53+
"maximumError": "5mb"
54+
}
55+
]
56+
}
57+
}
58+
},
59+
"serve": {
60+
"builder": "@angular-devkit/build-angular:dev-server",
61+
"options": {
62+
"browserTarget": "my-grid-app:build"
63+
},
64+
"configurations": {
65+
"production": {
66+
"browserTarget": "my-grid-app:build:production"
67+
}
68+
}
69+
},
70+
"extract-i18n": {
71+
"builder": "@angular-devkit/build-angular:extract-i18n",
72+
"options": {
73+
"browserTarget": "my-grid-app:build"
74+
}
75+
},
76+
"test": {
77+
"builder": "@angular-devkit/build-angular:karma",
78+
"options": {
79+
"main": "src/test.ts",
80+
"polyfills": "src/polyfills.ts",
81+
"tsConfig": "src/tsconfig.spec.json",
82+
"karmaConfig": "src/karma.conf.js",
83+
"styles": [
84+
"src/styles.css",
85+
"./node_modules/@syncfusion/ej2-material-theme/styles/material.css"
86+
],
87+
"scripts": [],
88+
"assets": [
89+
"src/favicon.ico",
90+
"src/assets"
91+
]
92+
}
93+
},
94+
"lint": {
95+
"builder": "@angular-devkit/build-angular:tslint",
96+
"options": {
97+
"tsConfig": [
98+
"src/tsconfig.app.json",
99+
"src/tsconfig.spec.json"
100+
],
101+
"exclude": [
102+
"**/node_modules/**"
103+
]
104+
}
105+
}
106+
}
107+
},
108+
"my-grid-app-e2e": {
109+
"root": "e2e/",
110+
"projectType": "application",
111+
"prefix": "",
112+
"architect": {
113+
"e2e": {
114+
"builder": "@angular-devkit/build-angular:protractor",
115+
"options": {
116+
"protractorConfig": "e2e/protractor.conf.js",
117+
"devServerTarget": "my-grid-app:serve"
118+
},
119+
"configurations": {
120+
"production": {
121+
"devServerTarget": "my-grid-app:serve:production"
122+
}
123+
}
124+
},
125+
"lint": {
126+
"builder": "@angular-devkit/build-angular:tslint",
127+
"options": {
128+
"tsConfig": "e2e/tsconfig.e2e.json",
129+
"exclude": [
130+
"**/node_modules/**"
131+
]
132+
}
133+
}
134+
}
135+
}
136+
},
137+
"defaultProject": "my-grid-app"
138+
}

e2e/protractor.conf.js

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Protractor configuration file, see link for more information
2+
// https://github.com/angular/protractor/blob/master/lib/config.ts
3+
4+
const { SpecReporter } = require('jasmine-spec-reporter');
5+
6+
exports.config = {
7+
allScriptsTimeout: 11000,
8+
specs: [
9+
'./src/**/*.e2e-spec.ts'
10+
],
11+
capabilities: {
12+
'browserName': 'chrome'
13+
},
14+
directConnect: true,
15+
baseUrl: 'http://localhost:4200/',
16+
framework: 'jasmine',
17+
jasmineNodeOpts: {
18+
showColors: true,
19+
defaultTimeoutInterval: 30000,
20+
print: function() {}
21+
},
22+
onPrepare() {
23+
require('ts-node').register({
24+
project: require('path').join(__dirname, './tsconfig.e2e.json')
25+
});
26+
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27+
}
28+
};

e2e/src/app.e2e-spec.ts

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { AppPage } from './app.po';
2+
import { browser, logging } from 'protractor';
3+
4+
describe('workspace-project App', () => {
5+
let page: AppPage;
6+
7+
beforeEach(() => {
8+
page = new AppPage();
9+
});
10+
11+
it('should display welcome message', () => {
12+
page.navigateTo();
13+
expect(page.getTitleText()).toEqual('Welcome to my-grid-app!');
14+
});
15+
16+
afterEach(async () => {
17+
// Assert that there are no errors emitted from the browser
18+
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
19+
expect(logs).not.toContain(jasmine.objectContaining({
20+
level: logging.Level.SEVERE,
21+
} as logging.Entry));
22+
});
23+
});

e2e/src/app.po.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { browser, by, element } from 'protractor';
2+
3+
export class AppPage {
4+
navigateTo() {
5+
return browser.get(browser.baseUrl) as Promise<any>;
6+
}
7+
8+
getTitleText() {
9+
return element(by.css('app-root h1')).getText() as Promise<string>;
10+
}
11+
}

e2e/tsconfig.e2e.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../out-tsc/app",
5+
"module": "commonjs",
6+
"target": "es5",
7+
"types": [
8+
"jasmine",
9+
"jasminewd2",
10+
"node"
11+
]
12+
}
13+
}

package.json

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "my-grid-app",
3+
"version": "0.0.0",
4+
"scripts": {
5+
"ng": "ng",
6+
"start": "ng serve",
7+
"build": "ng build",
8+
"test": "ng test",
9+
"lint": "ng lint",
10+
"e2e": "ng e2e"
11+
},
12+
"private": true,
13+
"dependencies": {
14+
"@angular/animations": "~7.2.0",
15+
"@angular/common": "~7.2.0",
16+
"@angular/compiler": "~7.2.0",
17+
"@angular/core": "~7.2.0",
18+
"@angular/forms": "~7.2.0",
19+
"@angular/platform-browser": "~7.2.0",
20+
"@angular/platform-browser-dynamic": "~7.2.0",
21+
"@angular/router": "~7.2.0",
22+
"@syncfusion/ej2-angular-grids": "^17.1.48",
23+
"core-js": "^2.5.4",
24+
"rxjs": "~6.3.3",
25+
"tslib": "^1.9.0",
26+
"zone.js": "~0.8.26",
27+
"@syncfusion/ej2-material-theme": "~17.1.47"
28+
},
29+
"devDependencies": {
30+
"@angular-devkit/build-angular": "~0.13.0",
31+
"@angular/cli": "~7.3.8",
32+
"@angular/compiler-cli": "~7.2.0",
33+
"@angular/language-service": "~7.2.0",
34+
"@types/jasmine": "~2.8.8",
35+
"@types/jasminewd2": "~2.0.3",
36+
"@types/node": "~8.9.4",
37+
"angular-in-memory-web-api": "^0.8.0",
38+
"codelyzer": "~4.5.0",
39+
"jasmine-core": "~2.99.1",
40+
"jasmine-spec-reporter": "~4.2.1",
41+
"karma": "~4.0.0",
42+
"karma-chrome-launcher": "~2.2.0",
43+
"karma-coverage-istanbul-reporter": "~2.0.1",
44+
"karma-jasmine": "~1.1.2",
45+
"karma-jasmine-html-reporter": "^0.2.2",
46+
"protractor": "~5.4.0",
47+
"ts-node": "~7.0.0",
48+
"tslint": "~5.11.0",
49+
"typescript": "~3.2.2"
50+
}
51+
}

src/app/app.component.html

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!--The content below is only a placeholder and can be replaced.-->
2+
<div style="text-align:center">
3+
<h1>
4+
Welcome to {{ title }}!
5+
</h1>
6+
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
7+
</div>
8+
<h2>Here are some links to help you start: </h2>
9+
<ul>
10+
<li>
11+
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
12+
</li>
13+
<li>
14+
<h2><a target="_blank" rel="noopener" href="https://angular.io/cli">CLI Documentation</a></h2>
15+
</li>
16+
<li>
17+
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
18+
</li>
19+
</ul>
20+

src/app/app.component.spec.ts

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { TestBed, async } from '@angular/core/testing';
2+
import { AppComponent } from './app.component';
3+
4+
describe('AppComponent', () => {
5+
beforeEach(async(() => {
6+
TestBed.configureTestingModule({
7+
declarations: [
8+
AppComponent
9+
],
10+
}).compileComponents();
11+
}));
12+
13+
it('should create the app', () => {
14+
const fixture = TestBed.createComponent(AppComponent);
15+
const app = fixture.debugElement.componentInstance;
16+
expect(app).toBeTruthy();
17+
});
18+
19+
it(`should have as title 'my-grid-app'`, () => {
20+
const fixture = TestBed.createComponent(AppComponent);
21+
const app = fixture.debugElement.componentInstance;
22+
expect(app.title).toEqual('my-grid-app');
23+
});
24+
25+
it('should render title in a h1 tag', () => {
26+
const fixture = TestBed.createComponent(AppComponent);
27+
fixture.detectChanges();
28+
const compiled = fixture.debugElement.nativeElement;
29+
expect(compiled.querySelector('h1').textContent).toContain('Welcome to my-grid-app!');
30+
});
31+
});

0 commit comments

Comments
 (0)