-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(config):continue building out Webpack config
Webpack is running OK now but URL location is still off. Isn't loading unless you go all the way to app/app.component.html
- Loading branch information
Jason Hodges
committed
Aug 7, 2017
1 parent
6bf44e7
commit 6200f98
Showing
25 changed files
with
42,328 additions
and
136 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,56 @@ | |
"author": "Jason Hodges <[email protected]>", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "webpack" | ||
"build": "webpack", | ||
"watch": "webpack --progress --watch", | ||
"start": "webpack-dev-server --open --inline" | ||
}, | ||
"devDependencies": { | ||
"webpack": "^3.4.1" | ||
"@angular/compiler": "^4.3.3", | ||
"@angular/compiler-cli": "^4.3.3", | ||
"@ngtools/webpack": "^1.5.5", | ||
"@types/angular": "^1.6.28", | ||
"@types/angular-animate": "^1.5.8", | ||
"@types/angular-cookies": "^1.4.4", | ||
"@types/angular-route": "^1.3.4", | ||
"@types/core-js": "^0.9.42", | ||
"@types/jasmine": "^2.5.53", | ||
"@types/karma": "^0.13.36", | ||
"@types/node": "^8.0.19", | ||
"angular-router-loader": "^0.6.0", | ||
"angular2-template-loader": "^0.6.2", | ||
"awesome-typescript-loader": "^3.2.2", | ||
"css-loader": "^0.28.4", | ||
"file-loader": "^0.11.2", | ||
"html-loader": "^0.5.0", | ||
"jasmine-core": "^2.7.0", | ||
"karma": "^1.7.0", | ||
"karma-chrome-launcher": "^2.2.0", | ||
"karma-jasmine": "^1.1.0", | ||
"karma-sourcemap-loader": "^0.3.7", | ||
"karma-spec-reporter": "^0.0.31", | ||
"karma-webpack": "^2.0.4", | ||
"node-sass": "^4.5.3", | ||
"raw-loader": "^0.5.1", | ||
"rimraf": "^2.6.1", | ||
"sass-loader": "^6.0.6", | ||
"style-loader": "^0.18.2", | ||
"typescript": "^2.4.2", | ||
"webpack": "^3.4.1", | ||
"webpack-dev-server": "^2.6.1" | ||
}, | ||
"dependencies": { | ||
"@angular/animations": "^4.3.3", | ||
"@angular/common": "^4.3.3", | ||
"@angular/core": "^4.3.3", | ||
"@angular/http": "^4.3.3", | ||
"@angular/platform-browser": "^4.3.3", | ||
"@angular/platform-browser-dynamic": "^4.3.3", | ||
"@angular/router": "^4.3.3", | ||
"core-js": "^2.5.0", | ||
"reflect-metadata": "^0.1.10", | ||
"rxjs": "^5.4.2", | ||
"tslib": "^1.7.1", | ||
"zone.js": "^0.8.16" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class ExamplePlugin { | ||
apply(compiler) { | ||
compiler.plugin("run", (compiler, callback) => { | ||
console.log(`WEBPACK IS RUNNING`); | ||
callback(); | ||
}); | ||
} | ||
} | ||
|
||
module.exports = ExamplePlugin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h2>Hello {{title}}</h2> |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'ngxb-app', | ||
templateUrl: './app.component.html' | ||
}) | ||
export class AppComponent { | ||
title = 'NGX Blog'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { Routes, RouterModule } from '@angular/router'; | ||
import { HttpModule } from '@angular/http'; | ||
|
||
import { AppComponent } from './app.component'; | ||
|
||
|
||
@NgModule({ | ||
imports: [ | ||
BrowserModule, | ||
HttpModule, | ||
], | ||
declarations: [AppComponent], | ||
providers: [/* TODO: Providers go here */], | ||
bootstrap: [AppComponent], | ||
}) | ||
export class AppModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { Routes, RouterModule } from '@angular/router'; | ||
|
||
import { AppComponent } from './app.component'; | ||
|
||
const routes: Routes = [ | ||
{ path: '', component: AppComponent }, | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule], | ||
}) | ||
export class AppRoutingModule { } | ||
|
||
export const routedComponents = [AppComponent]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const environment = { | ||
production: true | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// The file contents for the current environment will overwrite these during build. | ||
// The build system defaults to the dev environment which uses `environment.ts`, but if you do | ||
// `ng build --env=prod` then `environment.prod.ts` will be used instead. | ||
// The list of which env maps to which file can be found in `.angular-cli.json`. | ||
|
||
export const environment = { | ||
production: false | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>NGX Blog</title> | ||
<base href="/"> | ||
</head> | ||
|
||
<body> | ||
<ngxb-app></ngxb-app> | ||
|
||
</body> | ||
|
||
</html> |
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import 'reflect-metadata'; | ||
|
||
import { enableProdMode } from '@angular/core'; | ||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | ||
|
||
import { AppModule } from './app/app.module'; | ||
import { environment } from './environments/environment'; | ||
|
||
if (environment.production) { | ||
enableProdMode(); | ||
} | ||
|
||
platformBrowserDynamic().bootstrapModule(AppModule); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/** | ||
* This file includes polyfills needed by Angular and is loaded before the app. | ||
* You can add your own extra polyfills to this file. | ||
* | ||
* This file is divided into 2 sections: | ||
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. | ||
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main | ||
* file. | ||
* | ||
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that | ||
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), | ||
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. | ||
* | ||
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html | ||
*/ | ||
|
||
/*************************************************************************************************** | ||
* BROWSER POLYFILLS | ||
*/ | ||
|
||
/** IE9, IE10 and IE11 requires all of the following polyfills. **/ | ||
// import 'core-js/es6/symbol'; | ||
// import 'core-js/es6/object'; | ||
// import 'core-js/es6/function'; | ||
// import 'core-js/es6/parse-int'; | ||
// import 'core-js/es6/parse-float'; | ||
// import 'core-js/es6/number'; | ||
// import 'core-js/es6/math'; | ||
// import 'core-js/es6/string'; | ||
// import 'core-js/es6/date'; | ||
// import 'core-js/es6/array'; | ||
// import 'core-js/es6/regexp'; | ||
// import 'core-js/es6/map'; | ||
// import 'core-js/es6/weak-map'; | ||
// import 'core-js/es6/set'; | ||
|
||
/** IE10 and IE11 requires the following for NgClass support on SVG elements */ | ||
// import 'classlist.js'; // Run `npm install --save classlist.js`. | ||
|
||
/** Evergreen browsers require these. **/ | ||
import 'core-js/es6/reflect'; | ||
import 'core-js/es7/reflect'; | ||
|
||
|
||
/** | ||
* Required to support Web Animations `@angular/animation`. | ||
* Needed for: All but Chrome, Firefox and Opera. http:https://caniuse.com/#feat=web-animation | ||
**/ | ||
// import 'web-animations-js'; // Run `npm install --save web-animations-js`. | ||
|
||
|
||
|
||
/*************************************************************************************************** | ||
* Zone JS is required by Angular itself. | ||
*/ | ||
import 'zone.js/dist/zone'; // Included with Angular CLI. | ||
|
||
|
||
|
||
/*************************************************************************************************** | ||
* APPLICATION IMPORTS | ||
*/ | ||
|
||
/** | ||
* Date, currency, decimal and percent pipes. | ||
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 | ||
*/ | ||
// import 'intl'; // Run `npm install --save intl`. | ||
/** | ||
* Need to import at least one locale-data with intl. | ||
*/ | ||
// import 'intl/locale-data/jsonp/en'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files | ||
|
||
import 'zone.js/dist/long-stack-trace-zone'; | ||
import 'zone.js/dist/proxy.js'; | ||
import 'zone.js/dist/sync-test'; | ||
import 'zone.js/dist/jasmine-patch'; | ||
import 'zone.js/dist/async-test'; | ||
import 'zone.js/dist/fake-async-test'; | ||
import { getTestBed } from '@angular/core/testing'; | ||
import { | ||
BrowserDynamicTestingModule, | ||
platformBrowserDynamicTesting | ||
} from '@angular/platform-browser-dynamic/testing'; | ||
|
||
// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any. | ||
declare var __karma__: any; | ||
declare var require: any; | ||
|
||
// Prevent Karma from running prematurely. | ||
__karma__.loaded = function () {}; | ||
|
||
// First, initialize the Angular testing environment. | ||
getTestBed().initTestEnvironment( | ||
BrowserDynamicTestingModule, | ||
platformBrowserDynamicTesting() | ||
); | ||
// Then we find all the tests. | ||
const context = require.context('./', true, /\.spec\.ts$/); | ||
// And load the modules. | ||
context.keys().map(context); | ||
// Finally, start Karma to run the tests. | ||
__karma__.start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "../out-tsc/app", | ||
"module": "es2015", | ||
"baseUrl": "", | ||
"types": [ | ||
|
||
] | ||
}, | ||
"exclude": [ | ||
"test.ts", | ||
"**/*.spec.ts" | ||
] | ||
} |
Oops, something went wrong.