Skip to content

Commit 1f0c994

Browse files
authored
Merge pull request #14 from thomasmoldovan/master
Update to latest versions and small fixes
2 parents 6a81f8e + ec11498 commit 1f0c994

File tree

6 files changed

+68
-69
lines changed

6 files changed

+68
-69
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## [ Angular2 Updated to RC6 ]
1+
## [ Angular2 Updated to 2.0.1 ]
22
# Angular2 MEAN - QuickStart application with ExpressJS, MongoDB, Gulp and Typescript (Repository Pattern)
33

44
[![Build status](https://ci.appveyor.com/api/projects/status/y7cp312hef8sju0w/branch/master?svg=true)](https://ci.appveyor.com/project/moizKachwala/angular2-express-mongo-gulp-node-typescript/branch/master)

client/app/app.html

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
1-
<header class="site-header" role="banner">
2-
<div class="navbar-wrapper">
3-
<nav class="navbar navbar-inverse" role="navigation">
4-
<div class="container">
5-
<div class="navbar-header">
6-
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
7-
<span class="sr-only">Toggle navigation</span>
8-
<span class="icon-bar"></span>
9-
<span class="icon-bar"></span>
10-
<span class="icon-bar"></span>
11-
</button>
12-
</div>
13-
<div class="navbar-collapse collapse">
14-
<ul class="nav navbar-nav navbar-right">
15-
<li class="active"> <a routerLink="/dashboard" routerLinkActive="active">Dashboard</a>
16-
</li>
17-
<li class="active"><a routerLink="/heroes" routerLinkActive="active">Heroes</a></li>
18-
</ul>
19-
</div>
20-
</div>
21-
</nav>
22-
</div>
23-
</header>
1+
<nav class="navbar navbar-inverse" role="navigation">
2+
<div class="navbar-header">
3+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-menu-collapse">
4+
<span class="sr-only">Toggle navigation</span>
5+
<span class="icon-bar"></span>
6+
<span class="icon-bar"></span>
7+
<span class="icon-bar"></span>
8+
</button>
9+
<a class="navbar-brand" href="/">{{ title }}</a>
10+
</div>
11+
<div class="collapse navbar-collapse navbar-menu-collapse">
12+
<ul class="nav navbar-nav navbar-right">
13+
<li class="active"> <a routerLink="/dashboard" routerLinkActive="active">Dashboard</a></li>
14+
<li class="active"><a routerLink="/heroes" routerLinkActive="active">Heroes</a></li>
15+
</ul>
16+
</div>
17+
</nav>
2418
<div class="container">
25-
<h1>{{title}}</h1>
26-
<router-outlet></router-outlet>
27-
</div>
19+
<router-outlet></router-outlet>
20+
</div>

client/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
<meta charset="UTF-8">
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88

9-
<link rel="stylesheet" href="css/bootstrap/dist/css/bootstrap.min.css">
9+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
10+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
11+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"></link>
1012

1113
<!-- 1. Load libraries -->
1214
<!-- Polyfill(s) for older browsers -->

gulpfile.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,31 @@ gulp.task('build:server', function () {
3030
var tsProject = tsc.createProject('server/tsconfig.json');
3131
var tsResult = gulp.src('server/src/**/*.ts')
3232
.pipe(sourcemaps.init())
33-
.pipe(tsc(tsProject))
33+
.pipe(tsProject());
3434
return tsResult.js
3535
.pipe(sourcemaps.write())
36-
.pipe(gulp.dest('dist/server'))
36+
.pipe(gulp.dest('dist/server'));
3737
});
3838

3939
gulp.task('build:client', function () {
4040
var tsProject = tsc.createProject('client/tsconfig.json');
4141
var tsResult = gulp.src('client/**/*.ts')
4242
.pipe(sourcemaps.init())
43-
.pipe(tsc(tsProject))
43+
.pipe(tsProject());
4444
return tsResult.js
4545
.pipe(sourcemaps.write())
46-
.pipe(gulp.dest('dist/client'))
46+
.pipe(gulp.dest('dist/client'));
4747
});
4848

4949
/**
5050
* Lint all custom TypeScript files.
5151
*/
5252
gulp.task('tslint', () => {
5353
return gulp.src("client/app/**/*.ts")
54-
.pipe(tslint())
55-
.pipe(tslint.report('prose'));
54+
.pipe(tslint({
55+
formatter: "prose"
56+
}))
57+
.pipe(tslint.report());
5658
});
5759

5860

@@ -62,7 +64,7 @@ gulp.task('tslint', () => {
6264
gulp.task("compile", ["tslint"], () => {
6365
let tsResult = gulp.src("client/**/*.ts")
6466
.pipe(sourcemaps.init())
65-
.pipe(tsc(tsProject));
67+
.pipe(tsProject());
6668
return tsResult.js
6769
.pipe(sourcemaps.write("."))
6870
.pipe(gulp.dest("dist/client"));
@@ -129,7 +131,7 @@ gulp.task('start', function () {
129131
, tasks: ['tslint']
130132
})
131133
.on('restart', function () {
132-
console.log('restarted!')
134+
console.log('restarted!');
133135
});
134136
});
135137

@@ -157,7 +159,7 @@ gulp.task('watch', function () {
157159
gulp.watch(["client/**/*.html", "client/**/*.css"], ['clientResources']).on('change', function (e) {
158160
console.log('Resource file ' + e.path + ' has been changed. Updating.');
159161
});
160-
162+
161163
gulp.watch(["server/src/**/*.ts"], ['compile']).on('change', function (e) {
162164
console.log('TypeScript file ' + e.path + ' has been changed. Compiling.');
163165
});

package.json

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"clean": "gulp clean",
77
"compile": "gulp compile",
88
"build": "gulp build",
9-
"deploy": "concurrent --kill-others \"gulp watch\" \"gulp start\"",
9+
"deploy": "concurrent --kill-others \"gulp watch\" \"node ./dist/server/bin/www",
1010
"postinstall": "gulp installTypings"
1111
},
1212
"repository": {
@@ -23,46 +23,48 @@
2323
"author": "Moiz Kachwala",
2424
"license": "MIT",
2525
"dependencies": {
26-
"@angular/common": "2.0.0-rc.6",
27-
"@angular/compiler": "2.0.0-rc.6",
28-
"@angular/compiler-cli": "0.6.0",
29-
"@angular/core": "2.0.0-rc.6",
30-
"@angular/forms": "2.0.0-rc.6",
31-
"@angular/http": "2.0.0-rc.6",
32-
"@angular/platform-browser": "2.0.0-rc.6",
33-
"@angular/platform-browser-dynamic": "2.0.0-rc.6",
34-
"@angular/router": "3.0.0-rc.2",
35-
"@angular/upgrade": "2.0.0-rc.6",
26+
"@angular/common": "~2.0.1",
27+
"@angular/compiler": "~2.0.1",
28+
"@angular/core": "~2.0.1",
29+
"@angular/forms": "~2.0.1",
30+
"@angular/http": "~2.0.1",
31+
"@angular/platform-browser": "~2.0.1",
32+
"@angular/platform-browser-dynamic": "~2.0.1",
33+
"@angular/router": "~3.0.1",
34+
"@angular/upgrade": "~2.0.1",
35+
"@angular/platform-server": "^2.0.1",
3636

37-
"core-js": "^2.4.1",
38-
"reflect-metadata": "^0.1.3",
39-
"rxjs": "5.0.0-beta.11",
40-
"systemjs": "0.19.38",
41-
"zone.js": "^0.6.17",
37+
"@angular/compiler-cli": "0.6.3",
4238

43-
"body-parser": "^1.15.1",
44-
"express": "^4.13.4",
45-
"mongoose": "^4.5.0",
46-
"bootstrap": "^3.3.6"
39+
"body-parser": "^1.15.2",
40+
"bootstrap": "^3.3.7",
41+
"core-js": "^2.4.1",
42+
"express": "^4.14.0",
43+
"mongoose": "^4.6.1",
44+
"reflect-metadata": "^0.1.8",
45+
"rxjs": "5.0.0-beta.12",
46+
"systemjs": "0.19.39",
47+
"zone.js": "^0.6.25"
4748
},
4849
"devDependencies": {
49-
"@types/core-js": "^0.9.32",
50-
"concurrently": "^2.1.0",
51-
"method-override": "^2.3.6",
50+
"@types/core-js": "^0.9.34",
51+
"concurrently": "^3.0.0",
52+
"del": "^2.2.2",
5253
"gulp": "^3.9.1",
5354
"gulp-concat": "^2.6.0",
54-
"gulp-nodemon": "^2.1.0",
55+
"gulp-nodemon": "^2.2.1",
5556
"gulp-sourcemaps": "^1.6.0",
56-
"gulp-tslint": "^4.3.3",
57-
"gulp-typescript": "^2.13.6",
58-
"gulp-typings": "^2.0.0",
59-
"del": "^2.2.0",
60-
"tslint": "^3.5.0",
57+
"gulp-tslint": "^6.1.2",
58+
"gulp-typescript": "^3.0.1",
59+
"gulp-typings": "^2.0.4",
60+
"method-override": "^2.3.6",
61+
"run-sequence": "^1.2.2",
6162
"ts-node": "1.3.0",
62-
"run-sequence": "^1.2.1"
63+
"tslint": "^3.15.1",
64+
"typescript": "^2.0.3"
6365
},
6466
"bugs": {
6567
"url": "https://github.com/moizKachwala/Angular2-expressjs-mongoose-gulp-node-typescript/issues"
6668
},
6769
"homepage": "https://github.com/moizKachwala/Angular2-expressjs-mongoose-gulp-node-typescript#readme"
68-
}
70+
}

tslint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"check-whitespace"
4444
],
4545
"radix": true,
46-
"semicolon": true,
46+
"semicolon": [true],
4747
"triple-equals": [
4848
true,
4949
"allow-null-check"

0 commit comments

Comments
 (0)