Skip to content

Commit e9dda70

Browse files
Merge pull request #163 from antonybudianto/regular-update
update e2e, gulp tsc breaking change update
2 parents fe89496 + d330b2e commit e9dda70

10 files changed

Lines changed: 31 additions & 55 deletions

File tree

config/gulp/config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ module.exports = function () {
1010
tmpApp = tmp + 'app/',
1111
tmpTest = tmp + 'test/',
1212
testHelper = test + 'test-helpers/',
13-
e2e = test + 'e2e/',
14-
tmpE2E = tmpTest + 'e2e/',
13+
e2e = root + 'e2e/',
1514
assets = src + 'assets/',
1615
assetsPath = {
1716
styles: assets + 'styles/',
@@ -69,7 +68,6 @@ module.exports = function () {
6968
tmp: tmp,
7069
tmpApp: tmpApp,
7170
tmpTest: tmpTest,
72-
tmpE2E: tmpE2E,
7371
testHelper: testHelper,
7472
e2e: e2e,
7573
e2eConfig: e2eConfig,

config/gulp/tasks/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ gulp.task('unit-test', ['tsc'], function (done) {
3434

3535
gulp.task('e2e', ['e2e-test']);
3636
gulp.task('driver-update', gulpProtractor['webdriver_update']);
37-
gulp.task('e2e-test', ['driver-update', 'tsc-e2e'], function () {
38-
gulp.src(config.tmpE2E + '**/*.spec.js')
37+
gulp.task('e2e-test', ['driver-update'], function () {
38+
gulp.src(config.e2e + '**/*.spec.ts')
3939
.pipe(gulpProtractor.protractor({
4040
configFile: 'config/test/protractor.conf.js',
4141
args: ['--baseUrl', config.e2eConfig.seleniumTarget]

config/gulp/tasks/typescript.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ var argv = require('yargs').argv;
88

99
/* Initialize TS Project */
1010
var typingFiles = [
11-
'typings/index.d.ts',
1211
config.src + 'manual_typings/**/*.d.ts'
1312
];
1413
var tsUnitFiles = [].concat(config.tsTestFiles.unit, config.tsTestFiles.helper);
15-
var tsE2EFiles = [].concat(config.tsTestFiles.e2e, config.tsTestFiles.helper);
16-
var tsFiles = [].concat(config.tsFiles, tsUnitFiles, tsE2EFiles);
14+
var tsFiles = [].concat(config.tsFiles, tsUnitFiles);
1715

1816
/* Watch changed typescripts file and compile it */
1917
gulp.task('watch-ts', function () {
@@ -36,10 +34,6 @@ gulp.task('tsc-unit', ['clean-ts-test'], function () {
3634
return compileTs(tsUnitFiles);
3735
});
3836

39-
gulp.task('tsc-e2e', ['clean-ts-test'], function () {
40-
return compileTs(tsE2EFiles);
41-
});
42-
4337
/* Lint typescripts */
4438
gulp.task('tslint', function () {
4539
return lintTs(tsFiles);
@@ -53,10 +47,6 @@ gulp.task('tslint-unit', function () {
5347
return lintTs(tsUnitFiles);
5448
});
5549

56-
gulp.task('tslint-e2e', function () {
57-
return lintTs(tsE2EFiles);
58-
});
59-
6050
function lintTs(files) {
6151
return gulp.src(files)
6252
.pipe(tslint({
@@ -80,7 +70,7 @@ function compileTs(files, watchMode) {
8070
}))
8171
.pipe(tslint.report())
8272
.pipe(sourcemaps.init())
83-
.pipe(ts(tsProject))
73+
.pipe(tsProject())
8474
.on('error', function () {
8575
if (watchMode) {
8676
return;

config/test/karma.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ module.exports = function(config) {
7373

7474
dependencies.forEach(function(key) {
7575
configuration.files.push({
76-
pattern: 'node_modules/' + key + '/**/*.js',
76+
pattern: 'node_modules/' + key + '/**/!(*.spec)+(.js)',
7777
included: false,
7878
watched: false
7979
});

config/test/protractor.conf.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require('ts-node/register');
2+
13
var glob = require('glob');
24
var seleniumPath = '../node_modules/gulp-protractor/node_modules/protractor/selenium/';
35
var seleniumJarPath = '';

package.json

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"npm": "~3.0.0"
1414
},
1515
"scripts": {
16-
"postinstall": "typings install",
1716
"start": "gulp serve-dev",
1817
"test": "gulp test",
1918
"e2e": "gulp e2e",
@@ -42,17 +41,21 @@
4241
"url": "https://github.com/antonybudianto/angular2-starter/issues"
4342
},
4443
"dependencies": {
45-
"@angular/common": "2.0.0",
46-
"@angular/compiler": "2.0.0",
47-
"@angular/core": "2.0.0",
48-
"@angular/forms": "2.0.0",
49-
"@angular/http": "2.0.0",
50-
"@angular/platform-browser": "2.0.0",
51-
"@angular/platform-browser-dynamic": "2.0.0",
52-
"@angular/router": "3.0.0",
44+
"@angular/common": "~2.0.2",
45+
"@angular/compiler": "~2.0.2",
46+
"@angular/core": "~2.0.2",
47+
"@angular/forms": "~2.0.2",
48+
"@angular/http": "~2.0.2",
49+
"@angular/platform-browser": "~2.0.2",
50+
"@angular/platform-browser-dynamic": "~2.0.2",
51+
"@angular/router": "~3.0.2",
5352
"@ngstarter/systemjs-extension": "1.0.0-rc.4",
53+
"@types/core-js": "^0.9.34",
54+
"@types/jasmine": "^2.5.35",
55+
"@types/lodash": "^4.14.37",
56+
"@types/selenium-webdriver": "^2.44.28",
5457
"bootstrap-sass": "^3.3.7",
55-
"codelyzer": "0.0.28",
58+
"codelyzer": "1.0.0-beta.0",
5659
"core-js": "^2.4.1",
5760
"del": "~2.2.2",
5861
"font-awesome": "^4.6.3",
@@ -66,13 +69,13 @@
6669
"gulp-sass": "^2.3.2",
6770
"gulp-sourcemaps": "^1.6.0",
6871
"gulp-template": "^4.0.0",
69-
"gulp-tslint": "6.1.1",
70-
"gulp-typescript": "~2.13.6",
72+
"gulp-tslint": "6.1.2",
73+
"gulp-typescript": "~3.0.2",
7174
"gulp-uglify": "~2.0.0",
7275
"gulp-useref": "~3.1.2",
7376
"jasmine-core": "~2.5.0",
7477
"jquery": "^3.1.0",
75-
"karma": "~1.2.0",
78+
"karma": "~1.3.0",
7679
"karma-coverage": "~1.1.1",
7780
"karma-ie-launcher": "^1.0.0",
7881
"karma-jasmine": "~1.0.2",
@@ -86,12 +89,13 @@
8689
"rxjs": "5.0.0-beta.12",
8790
"systemjs": "^0.19.37",
8891
"tslint": "~3.15.1",
89-
"typings": "^1.3.2",
90-
"yargs": "^5.0.0",
92+
"typescript": "~2.0.3",
93+
"yargs": "^6.0.0",
9194
"zone.js": "^0.6.21"
9295
},
9396
"devDependencies": {
9497
"browser-sync": "^2.14.0",
95-
"connect-history-api-fallback": "^1.2.0"
98+
"connect-history-api-fallback": "^1.2.0",
99+
"ts-node": "^1.4.0"
96100
}
97101
}

src/app/todolist/todolist.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
.ng-valid[required] {
1414
border-left: 5px solid #42A948; /* green */
1515
}
16-
.ng-invalid {
16+
.ng-invalid:not(form) {
1717
border-left: 5px solid orange; /* orange */
1818
}
1919
</style>

tslint.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,7 @@
8080
"use-output-property-decorator": true,
8181
"use-host-property-decorator": true,
8282
"no-attribute-parameter-decorator": true,
83-
"no-input-rename": true,
84-
"no-output-rename": true,
85-
"no-forward-ref" :true,
86-
"use-life-cycle-interface": true,
87-
"use-pipe-transform-interface": true,
88-
"pipe-naming": [true, "camelCase", "as"],
89-
"component-class-suffix": true,
90-
"directive-class-suffix": true,
91-
"import-destructuring-spacing": true
83+
"no-forward-ref": true,
84+
"pipe-naming": [true, "camelCase", "as"]
9285
}
9386
}

typings.json

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

0 commit comments

Comments
 (0)