Skip to content

Commit 167b51e

Browse files
committed
added porting templates
1 parent 41b2858 commit 167b51e

15 files changed

+369
-3
lines changed

.gitignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
/samples/**/build/
55
/samples/**/node_modules/
66
/samples/**/package-lock.json
7-
/samples-tmp/
8-
/samples-tmp/**/node_modules/
7+
# /samples-tmp/
8+
# /samples-tmp/**/node_modules/
99

1010
# browser auto-generated files:
11-
/porting/**
11+
# /porting/**
1212
/browser/**
1313
/browser/node_modules
1414
/browser/src/samples

porting/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# samples
2+
this folder contains stand-alone sample apps how to use igniteui-angular DV components

porting/templates/angular.json

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"demo": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"architect": {
11+
"build": {
12+
"builder": "@angular-devkit/build-angular:browser",
13+
"options": {
14+
"outputPath": "dist/demo",
15+
"index": "src/index.html",
16+
"main": "src/main.ts",
17+
"polyfills": "src/polyfills.ts",
18+
"tsConfig": "src/config/tsconfig.app.json",
19+
"assets": [
20+
"src/assets"
21+
],
22+
"styles": [
23+
"src/styles.scss"
24+
],
25+
"scripts": []
26+
},
27+
"configurations": {
28+
"production": {
29+
"fileReplacements": [
30+
{
31+
"replace": "src/environments/environment.ts",
32+
"with": "src/environments/environment.prod.ts"
33+
}
34+
],
35+
"optimization": true,
36+
"outputHashing": "all",
37+
"sourceMap": false,
38+
"extractCss": true,
39+
"namedChunks": false,
40+
"aot": true,
41+
"extractLicenses": true,
42+
"vendorChunk": false,
43+
"buildOptimizer": true
44+
}
45+
}
46+
},
47+
"serve": {
48+
"builder": "@angular-devkit/build-angular:dev-server",
49+
"options": {
50+
"browserTarget": "demo:build"
51+
},
52+
"configurations": {
53+
"production": {
54+
"browserTarget": "demo:build:production"
55+
}
56+
}
57+
},
58+
"extract-i18n": {
59+
"builder": "@angular-devkit/build-angular:extract-i18n",
60+
"options": {
61+
"browserTarget": "demo:build"
62+
}
63+
},
64+
"test": {
65+
"builder": "@angular-devkit/build-angular:karma",
66+
"options": {
67+
"main": "src/test.ts",
68+
"polyfills": "src/polyfills.ts",
69+
"tsConfig": "src/config/tsconfig.spec.json",
70+
"karmaConfig": "src/config/karma.conf.js",
71+
"styles": [
72+
"styles.css"
73+
],
74+
"scripts": [],
75+
"assets": [
76+
"src/assets"
77+
]
78+
}
79+
},
80+
"lint": {
81+
"builder": "@angular-devkit/build-angular:tslint",
82+
"options": {
83+
"tsConfig": [
84+
"src/config/tsconfig.app.json",
85+
"src/config/tsconfig.spec.json"
86+
],
87+
"exclude": [
88+
"**/node_modules/**"
89+
]
90+
}
91+
}
92+
}
93+
}
94+
},
95+
"schematics": {
96+
"@schematics/angular:component": {
97+
"prefix": "app",
98+
"styleext": "scss"
99+
},
100+
"@schematics/angular:directive": {
101+
"prefix": "app"
102+
}
103+
},
104+
"defaultProject": "demo"
105+
}

porting/templates/package.json

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"scripts": {
3+
"ng": "ng",
4+
"update": "ng update",
5+
"start": "node --max_old_space_size=12192 node_modules/@angular/cli/bin/ng serve -o",
6+
"lint": "ng lint"
7+
},
8+
"dependencies": {
9+
"@angular/animations": "12.2.1",
10+
"@angular/common": "^12.2.1",
11+
"@angular/compiler": "12.2.1",
12+
"@angular/core": "^12.2.1",
13+
"@angular/forms": "12.2.1",
14+
"@angular/platform-browser": "12.2.1",
15+
"@angular/platform-browser-dynamic": "12.2.1",
16+
"@types/hammerjs": "^2.0.35",
17+
"classlist.js": "^1.1.20150312",
18+
"core-js": "^2.6.2",
19+
"hammerjs": "^2.0.8",
20+
"igniteui-angular": "12.1.3",
21+
"igniteui-angular-charts": "12.1.0",
22+
"igniteui-angular-core": "12.1.0",
23+
"igniteui-angular-excel": "12.1.0",
24+
"igniteui-angular-gauges": "12.1.0",
25+
"igniteui-angular-maps": "12.1.0",
26+
"igniteui-angular-excel": "12.1.0",
27+
"igniteui-angular-spreadsheet": "12.1.0",
28+
"igniteui-angular-spreadsheet-chart-adapter": "12.1.0",
29+
"intl": "^1.2.5",
30+
"jszip": "^3.1.5",
31+
"rxjs": "^6.5.4",
32+
"tslib": "^2.0.0",
33+
"web-animations-js": "^2.3.2",
34+
"zone.js": "~0.11.4"
35+
},
36+
"devDependencies": {
37+
"@angular-devkit/build-angular": "~12.2.1",
38+
"@angular/cli": "^12.2.1",
39+
"@angular/compiler-cli": "12.2.1",
40+
"@angular/language-service": "12.2.1",
41+
"@types/node": "^12.11.1",
42+
"codelyzer": "^6.0.0",
43+
"jasmine-core": "~3.6.0",
44+
"jasmine-spec-reporter": "~5.0.0",
45+
"node-sass": "4.11.0",
46+
"sass.js": "0.10.13",
47+
"ts-node": "^7.0.1",
48+
"tslint": "~6.1.0",
49+
"typescript": "4.3.5"
50+
}
51+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "./tsconfig.app.json",
3+
"compilerOptions": {
4+
"target": "es5"
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "./tsconfig.base.json",
3+
"compilerOptions": {
4+
"outDir": "../../out-tsc/app",
5+
"baseUrl": "./",
6+
"types": []
7+
},
8+
"files": [
9+
"../main.ts",
10+
"../polyfills.ts"
11+
]
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
"importHelpers": true,
5+
"module": "es2020",
6+
"outDir": "../../dist/out-tsc",
7+
"sourceMap": false,
8+
"declaration": false,
9+
"moduleResolution": "node",
10+
"experimentalDecorators": true,
11+
"downlevelIteration": true, // required for excel library
12+
"target": "es5",
13+
"typeRoots": [
14+
"../../node_modules/@types"
15+
],
16+
"lib": [
17+
"es2017",
18+
"dom"
19+
]
20+
}
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"extends": "./tsconfig.base.json",
3+
"compilerOptions": {
4+
"outDir": "../../out-tsc/spec",
5+
"baseUrl": "./",
6+
"types": [
7+
"jasmine",
8+
"node"
9+
]
10+
},
11+
"files": [
12+
"../test.ts",
13+
"../polyfills.ts"
14+
],
15+
"include": [
16+
"../**/*.spec.ts",
17+
"../**/*.d.ts"
18+
]
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": "./tsconfig.base.json",
3+
"compilerOptions": {
4+
"outDir": "../../out-tsc/worker",
5+
"lib": [
6+
"es2018",
7+
"DOM"
8+
],
9+
"types": []
10+
},
11+
"include": [
12+
"../**/*Worker.ts"
13+
]
14+
}

porting/templates/src/index.html

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!doctype html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<title>IgniteUI for Angular | Example | infragistics</title>
7+
<base href="/">
8+
9+
<meta name="viewport" content="width=device-width, initial-scale=1">
10+
<link href="https://static.infragistics.com/xplatform/images/browsers/angular.ico" rel="icon" type="image/x-icon" >
11+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
12+
<link href="https://fonts.googleapis.com/css?family=Titillium+Web:300,400,600,700" rel="stylesheet">
13+
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
14+
<link href="https://static.infragistics.com/xplatform/css/samples/shared.v5.css" rel="stylesheet">
15+
<link href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" rel="stylesheet" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
16+
</head>
17+
18+
<body class="igx-typography">
19+
<app-root></app-root>
20+
</body>
21+
22+
</html>

porting/templates/src/main.ts

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// tslint:disable:no-string-literal
2+
import "./polyfills";
3+
import { enableProdMode } from "@angular/core";
4+
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
5+
import { AppModule } from "./app/app.module";
6+
7+
platformBrowserDynamic().bootstrapModule(AppModule).then(ref => {
8+
// ensure Angular destroys itself on hot reloads.
9+
if (window["ngRef"]) {
10+
window["ngRef"].destroy();
11+
}
12+
window["ngRef"] = ref;
13+
14+
// otherwise, log the boot error
15+
}).catch(err => console.error(err));

porting/templates/src/polyfills.ts

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/**
2+
* This file includes polyfills needed by Angular and is loaded before the app.
3+
* You can add your own extra polyfills to this file.
4+
*
5+
* This file is divided into 2 sections:
6+
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7+
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8+
* file.
9+
*
10+
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11+
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12+
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13+
*
14+
* Learn more in https://angular.io/guide/browser-support
15+
*/
16+
17+
/***************************************************************************************************
18+
* BROWSER POLYFILLS
19+
*/
20+
21+
import "core-js/es7/object";
22+
23+
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
24+
import "classlist.js"; // run `npm install --save classlist.js`.
25+
26+
/** IE10 and IE11 requires the following for the Reflect API. */
27+
import "core-js/es6/reflect";
28+
29+
/* Evergreen browsers require these. */
30+
// used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
31+
import "core-js/es7/reflect";
32+
33+
/*
34+
* Required to support Web Animations `@angular/platform-browser/animations`.
35+
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
36+
*/
37+
import "web-animations-js"; // run `npm install --save web-animations-js`.
38+
39+
/***************************************************************************************************
40+
* Zone JS is required by Angular itself.
41+
*/
42+
import "hammerjs/hammer";
43+
import "zone.js/dist/zone"; // included with Angular CLI.
44+
45+
/***************************************************************************************************
46+
* @angular/animations polyfill
47+
*/
48+
if (!Element.prototype.matches) {
49+
Element.prototype.matches = (Element.prototype as any).msMatchesSelector;
50+
}
51+
52+
/***************************************************************************************************
53+
* APPLICATION IMPORTS
54+
*/
55+
56+
/**
57+
* Date, currency, decimal and percent pipes.
58+
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
59+
*/
60+
// import "intl"; // Run `npm install --save intl`.
61+
// import "intl/locale-data/jsonp/de";
62+
/**
63+
* Need to import at least one locale-data with intl.
64+
*/
65+
// import "intl/locale-data/jsonp/en";

porting/templates/src/styles.scss

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* autoprefixer grid: on */
2+
html,
3+
body {
4+
height: 100%;
5+
width: 100%;
6+
overflow: hidden;
7+
margin: 0;
8+
box-sizing: border-box;
9+
}

porting/templates/src/typings.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* SystemJS module definition */
2+
declare var module: NodeModule;
3+
interface NodeModule {
4+
id: string;
5+
}

porting/templates/tsconfig.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience.
3+
It is not intended to be used to perform a compilation.
4+
5+
To learn more about this file see: https://angular.io/config/solution-tsconfig.
6+
*/
7+
{
8+
"files": [],
9+
"references": [
10+
{
11+
"path": "./src/config/tsconfig.app.json"
12+
},
13+
{
14+
"path": "./src/config/tsconfig.worker.json"
15+
},
16+
{
17+
"path": "./src/config/tsconfig.spec.json"
18+
}
19+
]
20+
}

0 commit comments

Comments
 (0)