diff --git a/.gitignore b/.gitignore index 463f60b..a2d37fb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ typings app/**/*.js app/**/*.js.map npm-debug.log* -.DS_store \ No newline at end of file +.DS_store +.idea \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 221e7f2..4b9b386 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,9 +1,13 @@ // Place your settings in this file to overwrite default and user settings. { - "editor.wrappingColumn": 0, - "files.exclude": { + "editor.tabSize": 2, + "editor.insertSpaces": true, + "files.exclude": { + "**/.idea": {}, "**/node_modules": {}, + "npm-debug.log*": {}, "typings": {}, + "app/**/*.js": {}, "**/*.map": {}, "**/*.js": { "when": "$(basename).ts" diff --git a/README.md b/README.md index 471bece..9192c75 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,8 @@ Topics include: `npm start` +The repository has a branch for each video starting point. For example, the branch **02-01b** is used as the starting code for the video *02-01 NgModule and the root module*. You can checkout branches using `git checkout ` and not have to re-run `npm install` each time since you will remain in the same root folder. + Note that the site will run using `lite-server` and will be served up at the following local address: http://localhost:3000 diff --git a/app/app.component.ts b/app/app.module.ts similarity index 100% rename from app/app.component.ts rename to app/app.module.ts diff --git a/app/main.ts b/app/main.ts deleted file mode 100644 index e69de29..0000000 diff --git a/index.html b/index.html index 1233aed..3efc9eb 100644 --- a/index.html +++ b/index.html @@ -1,29 +1,29 @@ - MeWL - - - - - - - - - - + + + + + + + - Loading... + Loading... \ No newline at end of file diff --git a/media/01.png b/media/01.png new file mode 100644 index 0000000..ae2671b Binary files /dev/null and b/media/01.png differ diff --git a/media/02.png b/media/02.png new file mode 100644 index 0000000..7ab30ba Binary files /dev/null and b/media/02.png differ diff --git a/media/03.png b/media/03.png new file mode 100644 index 0000000..2c9af84 Binary files /dev/null and b/media/03.png differ diff --git a/media/04.png b/media/04.png new file mode 100644 index 0000000..7b44937 Binary files /dev/null and b/media/04.png differ diff --git a/package.json b/package.json index d60797f..d15f5e1 100644 --- a/package.json +++ b/package.json @@ -1,39 +1,41 @@ { - "name": "angular2-essential-training", - "version": "1.0.0", - "author": "Justin Schwartzenberger", - "description": "This project is the repository for my Angular 2 Essential Training course on Lynda.com.", - "repository": { - "type": "git", - "url": "https://github.com/LyndaExerciseFiles/angular2-essential-training.git" - }, - "scripts": { - "postinstall": "npm run typings install", - "tsc": "tsc", - "tsc:w": "tsc -w", - "lite": "lite-server", - "start": "tsc && concurrently \"tsc -w\" \"lite-server\" ", - "typings": "typings" - }, - "dependencies": { - "@angular/common": "2.0.0-rc.4", - "@angular/compiler": "2.0.0-rc.4", - "@angular/core": "2.0.0-rc.4", - "@angular/forms": "0.2.0", - "@angular/http": "2.0.0-rc.4", - "@angular/platform-browser": "2.0.0-rc.4", - "@angular/platform-browser-dynamic": "2.0.0-rc.4", - "@angular/router": "3.0.0-beta.2", - "systemjs": "0.19.27", - "core-js": "^2.4.0", - "reflect-metadata": "^0.1.3", - "rxjs": "5.0.0-beta.6", - "zone.js": "^0.6.12" - }, - "devDependencies": { - "concurrently": "^2.2.0", - "lite-server": "^2.2.0", - "typescript": "^1.8.10", - "typings": "^1.0.4" - } -} \ No newline at end of file + "name": "angular2-essential-training", + "version": "1.0.0", + "author": "Justin Schwartzenberger", + "description": "This project is the repository for my Angular 2 Essential Training course on Lynda.com.", + "repository": { + "type": "git", + "url": "https://github.com/LyndaExerciseFiles/angular2-essential-training.git" + }, + "scripts": { + "clean": "rimraf app/**/*.js app/**/*.js.map", + "tsc": "tsc", + "tsc:w": "tsc -w", + "lite": "lite-server", + "prestart": "npm run clean", + "start": "tsc && concurrently \"tsc -w\" \"lite-server\" " + }, + "dependencies": { + "@angular/common": "2.0.0", + "@angular/compiler": "2.0.0", + "@angular/core": "2.0.0", + "@angular/forms": "2.0.0", + "@angular/http": "2.0.0", + "@angular/platform-browser": "2.0.0", + "@angular/platform-browser-dynamic": "2.0.0", + "@angular/router": "3.0.0", + "systemjs": "0.19.27", + "core-js": "2.4.1", + "reflect-metadata": "0.1.3", + "rxjs": "5.0.0-beta.12", + "zone.js": "0.6.23" + }, + "devDependencies": { + "@types/core-js": "^0.9.34", + "@types/node": "^6.0.41", + "concurrently": "2.2.0", + "lite-server": "2.2.2", + "rimraf": "2.5.4", + "typescript": "2.0.2" + } +} diff --git a/sample.txt b/sample.txt new file mode 100644 index 0000000..8c96068 --- /dev/null +++ b/sample.txt @@ -0,0 +1,10 @@ +var categories = []; +mediaItems.forEach(mediaItem => { + if (categories.indexOf(mediaItem.category) <= -1) { + categories.push(mediaItem.category); + } +}); +return categories.join(', '); + + +[\\w\\-\\s\\/]+ diff --git a/systemjs.config.js b/systemjs.config.js index 0e29e06..91e56aa 100644 --- a/systemjs.config.js +++ b/systemjs.config.js @@ -2,20 +2,20 @@ * System configuration for Angular 2 samples * Adjust as necessary for your application needs. */ -(function(global) { +(function (global) { // map tells the System loader where to look for things var map = { - 'app': 'app', // 'dist', + 'app': 'app', // 'dist', - '@angular': 'node_modules/@angular', - 'rxjs': 'node_modules/rxjs' + '@angular': 'node_modules/@angular', + 'rxjs': 'node_modules/rxjs' }; // packages tells the System loader how to load when no filename and/or no extension var packages = { - 'app': { main: 'main.js', defaultExtension: 'js' }, - 'rxjs': { defaultExtension: 'js' } + 'app': { main: 'main.js', defaultExtension: 'js' }, + 'rxjs': { defaultExtension: 'js' } }; var ngPackageNames = [ @@ -31,12 +31,12 @@ // Individual files (~300 requests): function packIndex(pkgName) { - packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' }; + packages['@angular/' + pkgName] = { main: 'index.js', defaultExtension: 'js' }; } // Bundled (~40 requests): function packUmd(pkgName) { - packages['@angular/'+pkgName] = { main: '/bundles/' + pkgName + '.umd.js', defaultExtension: 'js' }; + packages['@angular/' + pkgName] = { main: '/bundles/' + pkgName + '.umd.js', defaultExtension: 'js' }; } // Most environments should use UMD; some (Karma) need the individual index files diff --git a/typings.json b/typings.json deleted file mode 100644 index b8c238f..0000000 --- a/typings.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "globalDependencies": { - "core-js": "registry:dt/core-js#0.0.0+20160602141332", - "node": "registry:dt/node#6.0.0+20160621231320" - } -} \ No newline at end of file