Skip to content
This repository has been archived by the owner on Jun 15, 2020. It is now read-only.

Upgrade to angular 2 rc 5 #116

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,16 @@
import {Component} from "@angular/core";

// import Angular 2 Component Router
import { RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from '@angular/router-deprecated';
import { ROUTER_DIRECTIVES } from "@angular/router";

// app components
import {Home} from "../pages/home/home";

// app services
//import {appServicesInjectables} from "core/services/services";

@Component({
selector: "app",
templateUrl: "core/app.template.html", //template: "<router-outlet></router-outlet>",
directives: [ROUTER_DIRECTIVES]
})
@RouteConfig([
{ path: "/", component: Home, name: "Home", data: undefined } // the as serves as alias for links, etc
])
export class App {
constructor() {
console.log("Application bootstrapped!");
Expand Down
23 changes: 23 additions & 0 deletions app/templates/applicationFiles/app/core/app.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { routing } from './app.routing';

// app components
import { App } from './app.component';

// app services
//import {appServicesInjectables} from "core/services/services";


@NgModule({
imports: [
BrowserModule,
routing
],
declarations: [
App
],
providers: [],
bootstrap: [ App ]
})
export class AppModule { }
10 changes: 10 additions & 0 deletions app/templates/applicationFiles/app/core/app.routing.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Routes, RouterModule } from '@angular/router';

// app components
import { Home } from '../pages/home/home';

const appRoutes: Routes = [
{ path: '/', component: Home }
];

export const routing = RouterModule.forRoot(appRoutes);
37 changes: 8 additions & 29 deletions app/templates/applicationFiles/app/core/boot.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,10 @@
"use strict";

import "reflect-metadata";
// import the application
import {App} from "./app";

// import Angular 2
import {bootstrap} from "@angular/platform-browser-dynamic";
import {provide, enableProdMode} from "@angular/core";
import {HTTP_PROVIDERS} from "@angular/http";
import {ELEMENT_PROBE_PROVIDERS} from "@angular/platform-browser";

// import Angular 2 Component Router
import {ROUTER_PROVIDERS} from "@angular/router-deprecated";

// enable production mode of Angular
// enableProdMode(); // enable for production (also uncomment the import above!)

// bootstrap our app
console.log("Bootstrapping the App");

// in [] is the list of injector bindings. Those bindings are used when an injector is created. Passing these here make the bindings available application-wide
bootstrap(App, [
//appServicesInjectables, // alternative way of filling the injector with all the classes we want to be able to inject
ROUTER_PROVIDERS,
HTTP_PROVIDERS,
ELEMENT_PROBE_PROVIDERS // remove in production
]).then(
(success:any) => console.log("Bootstrap successful"),
(error:any) => console.error(error)
);
import 'reflect-metadata';
import { browserDynamicPlatform } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { AppModule } from './app.module';
// if (process.env.ENV === 'production') {
// enableProdMode();
// }
browserDynamicPlatform().bootstrapModule(AppModule);
82 changes: 35 additions & 47 deletions app/templates/projectFiles/jspm.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ System.config({
},

map: {
"@angular/common": "npm:@angular/[email protected]",
"@angular/compiler": "npm:@angular/[email protected]",
"@angular/core": "npm:@angular/[email protected]",
"@angular/forms": "npm:@angular/[email protected]",
"@angular/http": "npm:@angular/[email protected]",
"@angular/platform-browser": "npm:@angular/[email protected]",
"@angular/platform-browser-dynamic": "npm:@angular/[email protected]",
"@angular/router": "npm:@angular/[email protected]",
"@angular/router-deprecated": "npm:@angular/[email protected]",
"@angular/upgrade": "npm:@angular/[email protected]",
"@angular/common": "npm:@angular/[email protected]",
"@angular/compiler": "npm:@angular/[email protected]",
"@angular/core": "npm:@angular/[email protected]",
"@angular/forms": "npm:@angular/[email protected]",
"@angular/http": "npm:@angular/[email protected]",
"@angular/platform-browser": "npm:@angular/[email protected]",
"@angular/platform-browser-dynamic": "npm:@angular/[email protected]",
"@angular/router": "npm:@angular/[email protected]",
"babel": "npm:[email protected]",
"babel-runtime": "npm:[email protected]",
"normalize.css": "github:necolas/[email protected]",
Expand Down Expand Up @@ -95,62 +93,52 @@ System.config({
"path": "github:jspm/[email protected]",
"process": "github:jspm/[email protected]"
},
"npm:@angular/[email protected].3": {
"@angular/core": "npm:@angular/[email protected].3",
"npm:@angular/[email protected].5": {
"@angular/core": "npm:@angular/[email protected].5",
"process": "github:jspm/[email protected]"
},
"npm:@angular/[email protected].3": {
"@angular/core": "npm:@angular/[email protected].3",
"npm:@angular/[email protected].5": {
"@angular/core": "npm:@angular/[email protected].5",
"process": "github:jspm/[email protected]"
},
"npm:@angular/[email protected].3": {
"npm:@angular/[email protected].5": {
"process": "github:jspm/[email protected]",
"rxjs": "npm:[email protected]",
"zone.js": "npm:[email protected]"
},
"npm:@angular/forms@0.1.1": {
"@angular/common": "npm:@angular/[email protected].3",
"@angular/compiler": "npm:@angular/[email protected].3",
"@angular/core": "npm:@angular/[email protected].3",
"npm:@angular/forms@0.3.0": {
"@angular/common": "npm:@angular/[email protected].5",
"@angular/compiler": "npm:@angular/[email protected].5",
"@angular/core": "npm:@angular/[email protected].5",
"process": "github:jspm/[email protected]"
},
"npm:@angular/[email protected].3": {
"@angular/core": "npm:@angular/[email protected].3",
"@angular/platform-browser": "npm:@angular/[email protected].3",
"npm:@angular/[email protected].5": {
"@angular/core": "npm:@angular/[email protected].5",
"@angular/platform-browser": "npm:@angular/[email protected].5",
"rxjs": "npm:[email protected]"
},
"npm:@angular/[email protected].3": {
"@angular/common": "npm:@angular/[email protected].3",
"@angular/compiler": "npm:@angular/[email protected].3",
"@angular/core": "npm:@angular/[email protected].3",
"@angular/platform-browser": "npm:@angular/[email protected].3",
"npm:@angular/[email protected].5": {
"@angular/common": "npm:@angular/[email protected].5",
"@angular/compiler": "npm:@angular/[email protected].5",
"@angular/core": "npm:@angular/[email protected].5",
"@angular/platform-browser": "npm:@angular/[email protected].5",
"process": "github:jspm/[email protected]"
},
"npm:@angular/[email protected].3": {
"@angular/common": "npm:@angular/[email protected].3",
"@angular/compiler": "npm:@angular/[email protected].3",
"@angular/core": "npm:@angular/[email protected].3",
"npm:@angular/[email protected].5": {
"@angular/common": "npm:@angular/[email protected].5",
"@angular/compiler": "npm:@angular/[email protected].5",
"@angular/core": "npm:@angular/[email protected].5",
"process": "github:jspm/[email protected]"
},
"npm:@angular/[email protected]": {
"@angular/common": "npm:@angular/[email protected]",
"@angular/core": "npm:@angular/[email protected]",
"@angular/platform-browser": "npm:@angular/[email protected]"
},
"npm:@angular/[email protected]": {
"@angular/common": "npm:@angular/[email protected]",
"@angular/compiler": "npm:@angular/[email protected]",
"@angular/core": "npm:@angular/[email protected]",
"@angular/platform-browser": "npm:@angular/[email protected]",
"@angular/platform-browser-dynamic": "npm:@angular/[email protected]",
"npm:@angular/[email protected]": {
"@angular/common": "npm:@angular/[email protected]",
"@angular/compiler": "npm:@angular/[email protected]",
"@angular/core": "npm:@angular/[email protected]",
"@angular/platform-browser": "npm:@angular/[email protected]",
"@angular/platform-browser-dynamic": "npm:@angular/[email protected]",
"process": "github:jspm/[email protected]",
"rxjs": "npm:[email protected]"
},
"npm:@angular/[email protected]": {
"@angular/compiler": "npm:@angular/[email protected]",
"@angular/core": "npm:@angular/[email protected]",
"@angular/platform-browser": "npm:@angular/[email protected]"
},
"npm:[email protected]": {
"assert": "github:jspm/[email protected]",
"bn.js": "npm:[email protected]",
Expand Down
42 changes: 19 additions & 23 deletions app/templates/projectTemplates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,14 @@
"jspm": {
"configFile": "jspm.conf.js",
"dependencies": {
"@angular/common": "npm:@angular/[email protected]",
"@angular/compiler": "npm:@angular/[email protected]",
"@angular/core": "npm:@angular/[email protected]",
"@angular/forms": "npm:@angular/[email protected]",
"@angular/http": "npm:@angular/[email protected]",
"@angular/platform-browser": "npm:@angular/[email protected]",
"@angular/platform-browser-dynamic": "npm:@angular/[email protected]",
"@angular/router": "npm:@angular/[email protected]",
"@angular/router-deprecated": "npm:@angular/[email protected]",
"@angular/upgrade": "npm:@angular/[email protected]",
"@angular/common": "npm:@angular/[email protected]",
"@angular/compiler": "npm:@angular/[email protected]",
"@angular/core": "npm:@angular/[email protected]",
"@angular/forms": "npm:@angular/[email protected]",
"@angular/http": "npm:@angular/[email protected]",
"@angular/platform-browser": "npm:@angular/[email protected]",
"@angular/platform-browser-dynamic": "npm:@angular/[email protected]",
"@angular/router": "npm:@angular/[email protected]",
"babel-runtime": "npm:[email protected]",
"normalize.css": "github:necolas/[email protected]",
"rxjs": "npm:[email protected]",
Expand All @@ -41,19 +39,17 @@
"dependencies": {
"babel-runtime": "^6.6.1",
"reflect-metadata": "^0.1.3",
"zone.js": "^0.6.6",
"zone.js": "^0.6.12",
"es6-shim": "^0.35.0",
"rxjs": "5.0.0-beta.6",
"@angular/common": "2.0.0-rc.3",
"@angular/compiler": "2.0.0-rc.3",
"@angular/core": "2.0.0-rc.3",
"@angular/forms": "0.1.1",
"@angular/http": "2.0.0-rc.3",
"@angular/platform-browser": "2.0.0-rc.3",
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
"@angular/router": "3.0.0-alpha.7",
"@angular/router-deprecated": "2.0.0-rc.2",
"@angular/upgrade": "2.0.0-rc.3"
"@angular/common": "2.0.0-rc.5",
"@angular/compiler": "2.0.0-rc.5",
"@angular/core": "2.0.0-rc.5",
"@angular/forms": "0.3.0",
"@angular/http": "2.0.0-rc.5",
"@angular/platform-browser": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
"@angular/router": "3.0.0-rc.1"
},
"devDependencies": {
"babel-core": "^6.7.4",
Expand All @@ -62,11 +58,11 @@
"gulp": "^3.9.1",
"jspm": "^0.16.31",
"nodemon": "^1.9.1",
"typescript": "^1.8.9",
"typescript": "^1.8.10",
"modern-web-dev-build": "^0.5.3",
"jasmine-core": "^2.4.1",
"karma-jasmine": "^0.3.8",
"typings": "^0.7.9"
"typings": "^1.0.4"
},
"engines": {
"node": ">=4.2.6",
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generator-modern-web-dev",
"version": "0.5.5",
"version": "0.5.6",
"description": "Modern Web Development Yeoman Generator: Gulp, ES2015, TypeScript, Angular 2, SASS, Minification, Bundling, Sourcemaps, ...",
"author": {
"name": "Sebastien Dubois",
Expand Down Expand Up @@ -37,16 +37,17 @@
"init"
],
"dependencies": {
"yeoman-generator": "^0.23.0",
"yosay": "^1.1.0",
"chalk": "^1.1.3",
"babel-runtime": "^6.6.1",
"chalk": "^1.1.3",
"string-length": "^1.0.1",
"update-notifier": "^0.7.0",
"string-length": "^1.0.1"
"yeoman-generator": "^0.23.4",
"yosay": "^1.1.0"
},
"devDependencies": {
"yeoman-assert": "^2.1.1",
"yeoman-test": "^1.1.0",
"babel-register": "^6.9.0",
"babel-core": "^6.7.4",
"babel-plugin-transform-es2015-modules-commonjs": "^6.7.0",
"babel-preset-es2015": "^6.6.0",
Expand Down