forked from angular/angular-cli
-
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.
Merge Webpack Feature branch into Master (angular#1455)
* build: use webpack for building apps. This pull request replaces the underlying broccoli build system and then replaces it with webpack as the build and bundler. This will affect the following commands (however the user-level) functionality should go unchanged (besides unimplemented flags which will come after this PR.): ng build (with --env flag and --watch flag supported) ng serve (with --port flag supported) ng test / ng e2e The webpack configuration is blackboxed, and therefore users will not see a webpack.config.js file in their repository. Also this PR will bump the typescript version to 2.0 (beta). Fixes angular#909 angular#1155 angular#882 * chore(lint) Corrected any eslint errors and cleaned up unused files * chore(cleanup) additional cleanup tasks performed. Removed unneeded code, indentation causing linting errors, add back tsconfig sourcemapping, removed console logs, deleted material unused files. * chore: remove bind from serve command * chore: simplify test command * chore: fix test warnings * chore: revert whitespace changes * chore: re-add mapRoot to tsconfig * chore: remove unused import * bugfix: fix broken tests * fix: fix mobile-specific feature test * bugfix: fix public folder test * fix: fixes for path mappings, tests, and coverage (angular#1359) * fix(): Multiple fixes for path mappings: * Removed invalid test case that was throwing path mappings tests because of a typescript bug. * Readded PathsPlugin for Path Mappings * Removed coverage preprocessor which was throwing bad type errors against ts code when it shouldn't be. * Added sourcemap support for istanbul instrumenter. Coverage files are still being generated. * fix: fix the way the build command runs for mobile tests * fix: fix the way the build command runs for mobile tests * fix: replaced promise based ng command with sh.exec to allow mappings test to run correctly against mobile * fix: replaced promise based ng command with sh.exec to allow mappings test to run correctly against mobile * fix: add environment configuration replacement (angular#1364) * fix: add environment configuration replacement * remove debuggers * fix: move mobile test above config test because it relies on prod build from previous step * fix: removed unneeded interface moved config paths * fix(tests): re-enable sass/less/stylus tests (angular#1363) * chore: remove systemjs (angular#1376) * chore: remove vendor.ts (angular#1383) * chore: remove material2 test option (angular#1385) * fix(build): re-add support for sourceDir (angular#1378) * chore(build): remove broccoli (angular#1386) * chore: remove windows elevation check (angular#1384) * fix(test): add missing sourceDir (angular#1387) * fix: update node polyfill support properties for prod config to allow dev-server (aka ng serve) (angular#1395) * chore(tests): add prod env e2e test (angular#1394) * chore: cleanup of new files (angular#1388) * fix(serve): disable HMR (angular#1402) * chore: review docs (angular#1407) * feat(env): decouple build from env file (angular#1404) * fix: fix tsconfig for editors (angular#1420) * chore: fix webpack branch after merge conflicts (angular#1423) * fix: update to awesome-typescript-loader 2.1.0 (angular#1425) * fix: update to awesome-typescript-loader 2.1.0 which fixes a few issues shimming typings libs in tsconfig.json * fix: forgot to set libs in tsconfig blueprint * chore(blueprints): remove module.id (angular#1426) * feat: add host flag support for ng serve (angular#1442) * feat(test): add karma plugin (angular#1437) * chore(blueprints): re-add outDir (angular#1428) * feat: use @types instead of typings (angular#1449) * fix: make sourcemaps work in test (angular#1447) * feat: add utilities for typescript ast (angular#1159) (angular#1453) 'ast-utils.ts' provides typescript ast utility functions
- Loading branch information
Showing
69 changed files
with
1,464 additions
and
8,077 deletions.
There are no files selected for viewing
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
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
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
49 changes: 32 additions & 17 deletions
49
addon/ng2/blueprints/mobile/files/__path__/main-app-shell.ts
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 |
---|---|---|
@@ -1,29 +1,44 @@ | ||
import 'angular2-universal-polyfills'; | ||
import { provide } from '@angular/core'; | ||
import { APP_BASE_HREF } from '@angular/common'; | ||
import { APP_SHELL_BUILD_PROVIDERS } from '@angular/app-shell'; | ||
import { AppComponent } from './app/'; | ||
import { | ||
REQUEST_URL, | ||
ORIGIN_URL | ||
import { | ||
REQUEST_URL, | ||
ORIGIN_URL, | ||
Bootloader, | ||
BootloaderConfig, | ||
AppConfig | ||
} from 'angular2-universal'; | ||
import { AppComponent } from './app/'; | ||
|
||
export const options = { | ||
directives: [ | ||
// The component that will become the main App Shell | ||
AppComponent | ||
], | ||
const bootloaderConfig: BootloaderConfig = { | ||
platformProviders: [ | ||
APP_SHELL_BUILD_PROVIDERS, | ||
provide(ORIGIN_URL, { | ||
useValue: '' | ||
}) | ||
useValue: 'http://localhost:4200' // full urls are needed for node xhr | ||
}), | ||
provide(APP_BASE_HREF, { useValue: '/' }), | ||
], | ||
async: true, | ||
preboot: false | ||
} | ||
|
||
const appConfig: AppConfig = { | ||
directives: [ | ||
// The component that will become the main App Shell | ||
AppComponent | ||
], | ||
providers: [ | ||
// What URL should Angular be treating the app as if navigating | ||
provide(APP_BASE_HREF, {useValue: '/'}), | ||
provide(REQUEST_URL, {useValue: '/'}) | ||
], | ||
async: false, | ||
preboot: false | ||
}; | ||
provide(REQUEST_URL, { useValue: '/' }) | ||
] | ||
} | ||
|
||
export function getBootloader() : Bootloader { | ||
return new Bootloader(bootloaderConfig); | ||
} | ||
|
||
export function serialize(bootloader: Bootloader, template: string) : string { | ||
appConfig.template = template; | ||
return bootloader.serializeApplication(appConfig); | ||
} |
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
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
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
addon/ng2/blueprints/ng2/files/__path__/app/environments/environment.ts
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 for the current environment will overwrite this one during build. | ||
// Different environments can be found in ./environment.{dev|prod}.ts, and | ||
// you can create your own and use it with the --env flag. | ||
// The build system defaults to the dev environment. | ||
|
||
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export * from './environment'; | ||
export * from './environments/environment'; | ||
export * from './app.component'; |
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
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 @@ | ||
// Prefer CoreJS over the polyfills above | ||
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/set'; | ||
import 'core-js/es6/reflect'; | ||
|
||
import 'core-js/es7/reflect'; | ||
import 'zone.js/dist/zone'; |
Oops, something went wrong.