-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(integration): angular 5.2 + typescript 2.7 #852
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
836f282
test(integration): angular 5.2 + typescript 2.5
splincode c5c1ee6
chore: fix tsconfig.json
splincode 53e421e
chore: remove unused files
splincode 22c3b2c
chore: remove unused tslint.json
splincode b367d4d
test(integration): angular 5.2 + typescript 2.7
splincode 1287ffa
Merge branch 'master' into integration-test
splincode 4a4ab39
test(integration): angular 5.2 + typescript 2.7
splincode 2fc6da8
Merge branch 'master' into integration-test
splincode 59c3dfc
fix(integration): only support 2.8+
splincode 6199d79
Merge branch 'master' into integration-test
splincode dffe4c5
chore: fix merge conflict
splincode 8bff498
chore: change to used copied folder for @ngxs
markwhitfeld c24e569
chore: add start script and add polyfills
markwhitfeld d3b0113
fix: downgrade to typescript 2.7 again
markwhitfeld 02d0a28
fix: router.module should be usable from angular 5
markwhitfeld 6da442e
chore: add CircleCi config for ng5 integration test
markwhitfeld 5370634
fix: test should work in MacOS too
markwhitfeld dc7f824
fix: try again
markwhitfeld 74fda36
fix: trying again again
markwhitfeld e9cc296
fix: the Router plugin should work in Angular 5
markwhitfeld File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,14 +1,15 @@ | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
|
||
import { StoreModule } from './store.module'; | ||
import { AppComponent } from './app.component'; | ||
// import { NgxsModule } from '@ngxs/store'; | ||
|
||
const routes: Routes = [{ path: '', component: AppComponent }]; | ||
|
||
@NgModule({ | ||
declarations: [AppComponent], | ||
// fix me after they add support | ||
// imports: [BrowserModule, NgxsModule.forRoot([])], | ||
imports: [BrowserModule], | ||
imports: [BrowserModule, RouterModule.forRoot(routes), StoreModule], | ||
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,7 @@ | ||
import { State } from '@ngxs/store'; | ||
|
||
@State<string[]>({ | ||
name: 'app', | ||
defaults: [] | ||
}) | ||
export class AppState {} |
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,24 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { NgxsModule } from '@ngxs/store'; | ||
import { NgxsReduxDevtoolsPluginModule } from '@ngxs/devtools-plugin'; | ||
import { NgxsFormPluginModule } from '@ngxs/form-plugin'; | ||
import { NgxsLoggerPluginModule } from '@ngxs/logger-plugin'; | ||
import { NgxsStoragePluginModule } from '@ngxs/storage-plugin'; | ||
import { NgxsWebsocketPluginModule } from '@ngxs/websocket-plugin'; | ||
import { NgxsRouterPluginModule } from '@ngxs/router-plugin'; | ||
|
||
import { AppState } from './app.state'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
NgxsModule.forRoot([AppState]), | ||
NgxsReduxDevtoolsPluginModule.forRoot(), | ||
NgxsFormPluginModule.forRoot(), | ||
NgxsLoggerPluginModule.forRoot(), | ||
NgxsStoragePluginModule.forRoot(), | ||
NgxsWebsocketPluginModule.forRoot(), | ||
NgxsRouterPluginModule.forRoot() | ||
], | ||
exports: [NgxsModule] | ||
}) | ||
export class StoreModule {} |
4 changes: 4 additions & 0 deletions
4
integrations/hello-world-ng5/src/environments/environment.prod.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,4 @@ | ||
export const environment = { | ||
production: true, | ||
hmr: 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,3 +1,4 @@ | ||
export const environment = { | ||
production: true | ||
production: false, | ||
hmr: 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 |
---|---|---|
@@ -1,13 +1,25 @@ | ||
import { enableProdMode } from '@angular/core'; | ||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | ||
import { BootstrapModuleFn, hmr, WebpackModule } from '@ngxs/hmr-plugin'; | ||
|
||
import { AppModule } from './app/app.module'; | ||
import { environment } from './environments/environment'; | ||
|
||
declare const module: WebpackModule; | ||
|
||
if (environment.production) { | ||
enableProdMode(); | ||
} | ||
|
||
platformBrowserDynamic() | ||
.bootstrapModule(AppModule) | ||
.catch(err => console.log(err)); | ||
const bootstrap: BootstrapModuleFn = () => platformBrowserDynamic().bootstrapModule(AppModule); | ||
|
||
if (environment.hmr) { | ||
if (module['hot']) { | ||
hmr(module, bootstrap).catch(err => console.error(err)); | ||
} else { | ||
console.error('HMR is not enabled for webpack-dev-server!'); | ||
console.log('Are you using the --hmr flag for ng serve?'); | ||
} | ||
} else { | ||
bootstrap().catch(err => console.log(err)); | ||
} |
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 @@ | ||
import 'zone.js/dist/zone'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
export { NgxsHmrLifeCycle, NgxsHmrOptions, NgxsHmrSnapshot } from './symbols'; | ||
export { HmrInitAction } from './actions/hmr-init.action'; | ||
export { | ||
NgxsHmrLifeCycle, | ||
NgxsHmrOptions, | ||
NgxsHmrSnapshot, | ||
WebpackModule, | ||
BootstrapModuleFn | ||
} from './symbols'; | ||
export { HmrBeforeDestroyAction } from './actions/hmr-before-destroy.action'; | ||
export { hmr } from './hmr-bootstrap'; |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why have
WebpackModule
andBootstrapModuleFn
been added to the exports?Was something not working? It works fine in my app without this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it works without, I just wanted to use the types in the example, the user may also want this