Skip to content

Commit 050e3f7

Browse files
author
Xie, Ziyu
committed
Update demo to angular 6
1 parent ed8c8c9 commit 050e3f7

37 files changed

+2540
-2704
lines changed

.angular-cli.json

Lines changed: 0 additions & 67 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
/libpeerconnection.log
3232
npm-debug.log
3333
yarn-error.log
34+
testem.log
35+
/typings
3436

3537
# ignore build and dist for now
3638
.ng_build

angular.json

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"angular2-draggable-demo": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"prefix": "app",
11+
"schematics": {
12+
"@schematics/angular:component": {
13+
"styleext": "scss"
14+
}
15+
},
16+
"architect": {
17+
"build": {
18+
"builder": "@angular-devkit/build-angular:browser",
19+
"options": {
20+
"outputPath": "dist/docs",
21+
"index": "src/index.html",
22+
"main": "src/main.ts",
23+
"polyfills": "src/polyfills.ts",
24+
"tsConfig": "src/tsconfig.app.json",
25+
"assets": [
26+
"src/favicon.ico",
27+
"src/assets"
28+
],
29+
"styles": [
30+
"src/scss/styles.scss",
31+
"src/prism-darcula.css",
32+
"node_modules/font-awesome/css/font-awesome.css"
33+
],
34+
"scripts": [
35+
"node_modules/marked/lib/marked.js",
36+
"node_modules/prismjs/prism.js",
37+
"node_modules/prismjs/components/prism-markup.min.js",
38+
"node_modules/prismjs/components/prism-css.min.js",
39+
"node_modules/prismjs/components/prism-typescript.min.js",
40+
"node_modules/prismjs/components/prism-javascript.min.js",
41+
"node_modules/prismjs/components/prism-bash.min.js",
42+
"node_modules/prismjs/components/prism-diff.min.js"
43+
]
44+
},
45+
"configurations": {
46+
"production": {
47+
"fileReplacements": [
48+
{
49+
"replace": "src/environments/environment.ts",
50+
"with": "src/environments/environment.prod.ts"
51+
}
52+
],
53+
"optimization": true,
54+
"outputHashing": "all",
55+
"sourceMap": false,
56+
"extractCss": true,
57+
"namedChunks": false,
58+
"aot": true,
59+
"extractLicenses": true,
60+
"vendorChunk": false,
61+
"buildOptimizer": true
62+
}
63+
}
64+
},
65+
"serve": {
66+
"builder": "@angular-devkit/build-angular:dev-server",
67+
"options": {
68+
"browserTarget": "angular2-draggable-demo:build"
69+
},
70+
"configurations": {
71+
"production": {
72+
"browserTarget": "angular2-draggable-demo:build:production"
73+
}
74+
}
75+
},
76+
"extract-i18n": {
77+
"builder": "@angular-devkit/build-angular:extract-i18n",
78+
"options": {
79+
"browserTarget": "angular2-draggable-demo:build"
80+
}
81+
},
82+
"test": {
83+
"builder": "@angular-devkit/build-angular:karma",
84+
"options": {
85+
"main": "src/test.ts",
86+
"polyfills": "src/polyfills.ts",
87+
"tsConfig": "src/tsconfig.spec.json",
88+
"karmaConfig": "src/karma.conf.js",
89+
"styles": [
90+
"src/styles.scss"
91+
],
92+
"scripts": [],
93+
"assets": [
94+
"src/favicon.ico",
95+
"src/assets"
96+
]
97+
}
98+
},
99+
"lint": {
100+
"builder": "@angular-devkit/build-angular:tslint",
101+
"options": {
102+
"tsConfig": [
103+
"src/tsconfig.app.json",
104+
"src/tsconfig.spec.json"
105+
],
106+
"exclude": [
107+
"**/node_modules/**"
108+
]
109+
}
110+
}
111+
}
112+
},
113+
"angular2-draggable-demo-e2e": {
114+
"root": "e2e/",
115+
"projectType": "application",
116+
"architect": {
117+
"e2e": {
118+
"builder": "@angular-devkit/build-angular:protractor",
119+
"options": {
120+
"protractorConfig": "e2e/protractor.conf.js",
121+
"devServerTarget": "angular2-draggable-demo:serve"
122+
},
123+
"configurations": {
124+
"production": {
125+
"devServerTarget": "angular2-draggable-demo:serve:production"
126+
}
127+
}
128+
},
129+
"lint": {
130+
"builder": "@angular-devkit/build-angular:tslint",
131+
"options": {
132+
"tsConfig": "e2e/tsconfig.e2e.json",
133+
"exclude": [
134+
"**/node_modules/**"
135+
]
136+
}
137+
}
138+
}
139+
},
140+
"angular2-draggable": {
141+
"root": "projects/angular2-draggable",
142+
"sourceRoot": "projects/angular2-draggable/src",
143+
"projectType": "library",
144+
"prefix": "lib",
145+
"architect": {
146+
"build": {
147+
"builder": "@angular-devkit/build-ng-packagr:build",
148+
"options": {
149+
"tsConfig": "projects/angular2-draggable/tsconfig.lib.json",
150+
"project": "projects/angular2-draggable/ng-package.json"
151+
},
152+
"configurations": {
153+
"production": {
154+
"project": "projects/angular2-draggable/ng-package.prod.json"
155+
}
156+
}
157+
},
158+
"test": {
159+
"builder": "@angular-devkit/build-angular:karma",
160+
"options": {
161+
"main": "projects/angular2-draggable/src/test.ts",
162+
"tsConfig": "projects/angular2-draggable/tsconfig.spec.json",
163+
"karmaConfig": "projects/angular2-draggable/karma.conf.js"
164+
}
165+
},
166+
"lint": {
167+
"builder": "@angular-devkit/build-angular:tslint",
168+
"options": {
169+
"tsConfig": [
170+
"projects/angular2-draggable/tsconfig.lib.json",
171+
"projects/angular2-draggable/tsconfig.spec.json"
172+
],
173+
"exclude": [
174+
"**/node_modules/**"
175+
]
176+
}
177+
}
178+
}
179+
}
180+
},
181+
"defaultProject": "angular2-draggable-demo"
182+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const { SpecReporter } = require('jasmine-spec-reporter');
66
exports.config = {
77
allScriptsTimeout: 11000,
88
specs: [
9-
'./e2e/**/*.e2e-spec.ts'
9+
'./src/**/*.e2e-spec.ts'
1010
],
1111
capabilities: {
1212
'browserName': 'chrome'
@@ -21,8 +21,8 @@ exports.config = {
2121
},
2222
onPrepare() {
2323
require('ts-node').register({
24-
project: 'e2e/tsconfig.e2e.json'
24+
project: require('path').join(__dirname, './tsconfig.e2e.json')
2525
});
2626
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
2727
}
28-
};
28+
};
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { AppPage } from './app.po';
22

3-
describe('angular2-draggable-github App', () => {
3+
describe('workspace-project App', () => {
44
let page: AppPage;
55

66
beforeEach(() => {
@@ -9,6 +9,6 @@ describe('angular2-draggable-github App', () => {
99

1010
it('should display welcome message', () => {
1111
page.navigateTo();
12-
expect(page.getParagraphText()).toEqual('Welcome to app!');
12+
expect(page.getParagraphText()).toEqual('Welcome to angular2-draggable-demo!');
1313
});
1414
});
File renamed without changes.

e2e/tsconfig.e2e.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"extends": "../tsconfig.json",
33
"compilerOptions": {
4-
"outDir": "../out-tsc/e2e",
5-
"baseUrl": "./",
4+
"outDir": "../out-tsc/app",
65
"module": "commonjs",
76
"target": "es5",
87
"types": [
@@ -11,4 +10,4 @@
1110
"node"
1211
]
1312
}
14-
}
13+
}

lib/package.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

lib/src/public_api.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/src/tsconfig.lib.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)