Skip to content

Commit 436c33d

Browse files
committed
WIP - Re-sync with JavaScriptServices
Main goal is to re-align a bit more with JavaScriptServices to ensure people coming from there, wanting to add additional features, have an easier time syncing with this repo. Adds back vendor builds, Adds back fast HMR (but waiting for aspnet/JavaScriptServices#1204) AoT faster Cleans up multiple tsconfigs etc etc...
1 parent fe9ab9c commit 436c33d

File tree

65 files changed

+7263
-162
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+7263
-162
lines changed

Asp2017.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
<Target Name="RunWebpack" AfterTargets="ComputeFilesToPublish">
3131
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
3232
<Exec Command="npm install" />
33-
<Exec Command="node node_modules/webpack/bin/webpack.js --env.aot --env.client" />
34-
<Exec Command="node node_modules/webpack/bin/webpack.js --env.aot --env.server" />
33+
<Exec Command="node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod" />
34+
<Exec Command="node node_modules/webpack/bin/webpack.js --env.prod" />
3535
<!-- Include the newly-built files in the publish output -->
3636
<ItemGroup>
37-
<DistFiles Include="wwwroot\dist\**; Client\dist\**" />
37+
<DistFiles Include="wwwroot\dist\**; ClientApp\dist\**" />
3838
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
3939
<RelativePath>%(DistFiles.Identity)</RelativePath>
4040
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
@@ -43,9 +43,9 @@
4343
</Target>
4444
<Target Name="CleanDist" AfterTargets="Clean">
4545
<ItemGroup>
46-
<FilesToDelete Include="Client\dist\**; wwwroot\dist\**" />
46+
<FilesToDelete Include="ClientApp\dist\**; wwwroot\dist\**" />
4747
</ItemGroup>
4848
<Delete Files="@(FilesToDelete)" />
49-
<RemoveDir Directories="Client\dist; wwwroot\dist" />
49+
<RemoveDir Directories="ClientApp\dist; wwwroot\dist" />
5050
</Target>
5151
</Project>

Client/app/app.component.html

Lines changed: 0 additions & 6 deletions
This file was deleted.

Client/main.server.aot.ts

Lines changed: 0 additions & 41 deletions
This file was deleted.

Client/tsconfig.browser.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

Client/tsconfig.server.aot.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

Client/tsconfig.server.json

Lines changed: 0 additions & 9 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

Client/app/browser-app.module.ts renamed to ClientApp/app/app.module.browser.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
66
import { SignalRModule, SignalRConfiguration } from 'ng2-signalr';
77

88
import { ORIGIN_URL } from './shared/constants/baseurl.constants';
9-
import { AppModule } from './app.module';
9+
import { AppModuleShared } from './app.module';
1010
import { AppComponent } from './app.component';
1111
import { REQUEST } from './shared/constants/request';
1212
import { BrowserTransferStateModule } from '../modules/transfer-state/browser-transfer-state.module';
@@ -41,7 +41,7 @@ export function getRequest() {
4141
BrowserTransferStateModule,
4242

4343
// Our Common AppModule
44-
AppModule,
44+
AppModuleShared,
4545

4646
SignalRModule.forRoot(createConfig)
4747
],
@@ -58,5 +58,4 @@ export function getRequest() {
5858
}
5959
]
6060
})
61-
export class BrowserAppModule {
62-
}
61+
export class AppModule { }

Client/app/server-app.module.ts renamed to ClientApp/app/app.module.server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ServerModule } from '@angular/platform-server';
33
import { BrowserModule } from '@angular/platform-browser';
44
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
55

6-
import { AppModule } from './app.module';
6+
import { AppModuleShared } from './app.module';
77
import { AppComponent } from './app.component';
88
import { ServerTransferStateModule } from '../modules/transfer-state/server-transfer-state.module';
99
import { TransferState } from '../modules/transfer-state/transfer-state';
@@ -20,10 +20,10 @@ import { TransferState } from '../modules/transfer-state/transfer-state';
2020
ServerTransferStateModule,
2121

2222
// Our Common AppModule
23-
AppModule
23+
AppModuleShared
2424
]
2525
})
26-
export class ServerAppModule {
26+
export class AppModule {
2727

2828
constructor(private transferState: TransferState) { }
2929

0 commit comments

Comments
 (0)