Skip to content

Commit ce2b340

Browse files
Update template by the generated project (#59)
* Update template by the generated project * Add license
1 parent a9b5ac0 commit ce2b340

39 files changed

+227
-224
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Developer Express Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

angular.json

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
{
2-
"$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
66
"devextreme-angular-template": {
77
"root": "",
8+
"sourceRoot": "src",
89
"projectType": "application",
910
"prefix": "app",
11+
"schematics": {
12+
"@schematics/angular:component": {
13+
"styleext": "scss"
14+
}
15+
},
1016
"architect": {
1117
"build": {
1218
"builder": "@angular-devkit/build-angular:browser",
@@ -17,22 +23,14 @@
1723
"polyfills": "src/polyfills.ts",
1824
"tsConfig": "src/tsconfig.app.json",
1925
"assets": [
20-
{
21-
"glob": "favicon.ico",
22-
"input": "src",
23-
"output": "/"
24-
},
25-
{
26-
"glob": "**/*",
27-
"input": "src/assets",
28-
"output": "/assets"
29-
}
26+
"src/favicon.ico",
27+
"src/assets"
3028
],
3129
"styles": [
32-
{ "input": "src/styles.scss" },
33-
"./node_modules/devextreme/dist/css/dx.common.css",
30+
"node_modules/devextreme/dist/css/dx.common.css",
3431
"./src/themes/generated/theme.additional.css",
35-
"./src/themes/generated/theme.base.css"
32+
"./src/themes/generated/theme.base.css",
33+
"src/styles.scss"
3634
],
3735
"scripts": []
3836
},
@@ -81,22 +79,12 @@
8179
"tsConfig": "src/tsconfig.spec.json",
8280
"karmaConfig": "src/karma.conf.js",
8381
"styles": [
84-
{
85-
"input": "styles.scss"
86-
}
82+
"src/styles.scss"
8783
],
8884
"scripts": [],
8985
"assets": [
90-
{
91-
"glob": "favicon.ico",
92-
"input": "src/",
93-
"output": "/"
94-
},
95-
{
96-
"glob": "**/*",
97-
"input": "src/assets",
98-
"output": "/assets"
99-
}
86+
"src/favicon.ico",
87+
"src/assets"
10088
]
10189
}
10290
},
@@ -123,6 +111,11 @@
123111
"options": {
124112
"protractorConfig": "e2e/protractor.conf.js",
125113
"devServerTarget": "devextreme-angular-template:serve"
114+
},
115+
"configurations": {
116+
"production": {
117+
"devServerTarget": "devextreme-angular-template:serve:production"
118+
}
126119
}
127120
},
128121
"lint": {
@@ -136,5 +129,6 @@
136129
}
137130
}
138131
}
139-
}
132+
},
133+
"defaultProject": "devextreme-angular-template"
140134
}

package.json

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
22
"name": "devextreme-angular-template",
33
"version": "0.0.0",
4-
"license": "MIT",
54
"scripts": {
65
"ng": "ng",
7-
"start": "npm run build-themes && ng serve",
6+
"start": "ng serve",
87
"build": "ng build",
98
"test": "ng test",
109
"lint": "ng lint",
@@ -13,45 +12,43 @@
1312
},
1413
"private": true,
1514
"dependencies": {
16-
"@angular/animations": "^6.0.0",
17-
"@angular/cdk": "6.0.0",
18-
"@angular/common": "^6.0.0",
19-
"@angular/compiler": "^6.0.0",
20-
"@angular/core": "^6.0.0",
21-
"@angular/flex-layout": "6.0.0-beta.15",
22-
"@angular/forms": "^6.0.0",
23-
"@angular/http": "^6.0.0",
24-
"@angular/platform-browser": "^6.0.0",
25-
"@angular/platform-browser-dynamic": "^6.0.0",
26-
"@angular/router": "^6.0.0",
27-
"@types/jszip": "^3.1.3",
15+
"@angular/animations": "^6.1.0",
16+
"@angular/cdk": "^6.0.0",
17+
"@angular/common": "^6.1.0",
18+
"@angular/compiler": "^6.1.0",
19+
"@angular/core": "^6.1.0",
20+
"@angular/forms": "^6.1.0",
21+
"@angular/http": "^6.1.0",
22+
"@angular/platform-browser": "^6.1.0",
23+
"@angular/platform-browser-dynamic": "^6.1.0",
24+
"@angular/router": "^6.1.0",
25+
"copyfiles": "^2.1.0",
2826
"core-js": "^2.5.4",
2927
"devextreme": "18.2-unstable",
3028
"devextreme-angular": "18.2-unstable",
31-
"jszip": "^3.1.5",
32-
"rxjs": "^6.1.0",
33-
"zone.js": "^0.8.24"
29+
"rxjs": "~6.2.0",
30+
"zone.js": "~0.8.26"
3431
},
3532
"devDependencies": {
36-
"@angular-devkit/build-angular": "~0.5.0",
37-
"@angular/cli": "~6.0.0",
38-
"@angular/compiler-cli": "^6.0.0",
39-
"@angular/language-service": "^6.0.0",
40-
"@types/jasmine": "~2.8.6",
33+
"@angular-devkit/build-angular": "~0.8.0",
34+
"@angular/cli": "~6.2.4",
35+
"@angular/compiler-cli": "^6.1.0",
36+
"@angular/language-service": "^6.1.0",
37+
"@types/jasmine": "~2.8.8",
4138
"@types/jasminewd2": "~2.0.3",
4239
"@types/node": "~8.9.4",
43-
"codelyzer": "~4.2.1",
40+
"codelyzer": "~4.3.0",
4441
"devextreme-cli": "latest",
4542
"jasmine-core": "~2.99.1",
4643
"jasmine-spec-reporter": "~4.2.1",
47-
"karma": "~1.7.1",
44+
"karma": "~3.0.0",
4845
"karma-chrome-launcher": "~2.2.0",
49-
"karma-coverage-istanbul-reporter": "~1.4.2",
50-
"karma-jasmine": "~1.1.1",
46+
"karma-coverage-istanbul-reporter": "~2.0.1",
47+
"karma-jasmine": "~1.1.2",
5148
"karma-jasmine-html-reporter": "^0.2.2",
52-
"protractor": "~5.3.0",
53-
"ts-node": "~5.0.1",
54-
"tslint": "~5.9.1",
55-
"typescript": "~2.7.2"
49+
"protractor": "~5.4.0",
50+
"ts-node": "~7.0.0",
51+
"tslint": "~5.11.0",
52+
"typescript": "~2.9.2"
5653
}
5754
}

src/app/app-navigation.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ export const navigation = [
33
text: 'Home',
44
path: '/home',
55
icon: 'home'
6-
},
7-
{
6+
}, {
87
text: 'Examples',
98
icon: 'folder',
109
items: [{
@@ -14,5 +13,4 @@ export const navigation = [
1413
text: 'Display Data',
1514
path: '/display-data'
1615
}]
17-
}
18-
];
16+
}];

src/app/app-routing.module.ts

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
import { NgModule } from '@angular/core';
22
import { Routes, RouterModule } from '@angular/router';
3-
3+
import { HomeComponent } from './pages/home/home.component';
44
import { ProfileComponent } from './pages/profile/profile.component';
55
import { DisplayDataComponent } from './pages/display-data/display-data.component';
6-
import { HomeComponent } from './pages/home/home.component';
7-
8-
import {
9-
DxDataGridModule,
10-
DxFormModule
11-
} from 'devextreme-angular';
6+
import { DxDataGridModule, DxFormModule } from 'devextreme-angular';
127

13-
export const routes: Routes = [
8+
const routes: Routes = [
149
{
1510
path: '',
1611
redirectTo: 'home',
1712
pathMatch: 'full'
18-
}, {
13+
}
14+
, {
1915
path: 'home',
2016
component: HomeComponent
2117
}, {
@@ -24,16 +20,11 @@ export const routes: Routes = [
2420
}, {
2521
path: 'display-data',
2622
component: DisplayDataComponent
27-
}
28-
];
23+
}];
2924

3025
@NgModule({
31-
imports: [
32-
RouterModule.forRoot(routes),
33-
DxDataGridModule,
34-
DxFormModule
35-
],
36-
exports: [ RouterModule ],
37-
declarations: [HomeComponent, DisplayDataComponent, ProfileComponent]
26+
imports: [RouterModule.forRoot(routes), DxDataGridModule, DxFormModule],
27+
exports: [RouterModule],
28+
declarations: [HomeComponent, ProfileComponent, DisplayDataComponent]
3829
})
39-
export class PagesRoutingModule {}
30+
export class AppRoutingModule { }

src/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<app-side-nav-outer-toolbar title="DevExtreme Angular Template">
1+
<app-side-nav-outer-toolbar title="Devextreme Angular Template">
22
<router-outlet></router-outlet>
33

44
<app-footer>

src/app/app.component.spec.ts

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

src/app/app.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Component } from '@angular/core';
22

33
@Component({
4-
selector: 'app-root',
5-
templateUrl: './app.component.html',
6-
styleUrls: ['./app.component.scss']
4+
selector: 'app-root',
5+
templateUrl: './app.component.html',
6+
styleUrls: ['./app.component.scss']
77
})
8-
export class AppComponent {
9-
8+
export class AppComponent {
9+
title = 'devextreme-angular-template';
1010
}

src/app/app.module.ts

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,22 @@ import { BrowserModule } from '@angular/platform-browser';
22
import { NgModule } from '@angular/core';
33

44
import { AppComponent } from './app.component';
5-
6-
import { PagesRoutingModule } from './app-routing.module';
7-
import {
8-
SideNavOuterToolbarModule,
9-
SideNavInnerToolbarModule
10-
} from './layouts';
11-
5+
import { SideNavOuterToolbarModule, SideNavInnerToolbarModule } from './layouts';
126
import { FooterModule } from './shared/components/footer/footer.component';
7+
import { AppRoutingModule } from './app-routing.module';
138

149
@NgModule({
15-
declarations: [
16-
AppComponent
17-
],
18-
imports: [
19-
FooterModule,
20-
SideNavOuterToolbarModule,
21-
SideNavInnerToolbarModule,
22-
BrowserModule,
23-
PagesRoutingModule
24-
],
25-
providers: [],
26-
bootstrap: [AppComponent]
10+
declarations: [
11+
AppComponent
12+
],
13+
imports: [
14+
BrowserModule,
15+
SideNavOuterToolbarModule,
16+
SideNavInnerToolbarModule,
17+
FooterModule,
18+
AppRoutingModule
19+
],
20+
providers: [],
21+
bootstrap: [AppComponent]
2722
})
2823
export class AppModule { }

0 commit comments

Comments
 (0)