mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 18:19:40 +00:00
Compare commits
91 Commits
581-isomor
...
angular2-l
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df5d27d0d8 | ||
|
|
1f03b1e633 | ||
|
|
8544714cbb | ||
|
|
0c09c68b77 | ||
|
|
ee601bed50 | ||
|
|
ce40973859 | ||
|
|
347524a116 | ||
|
|
b9c387bf5f | ||
|
|
6ed6b8e3d2 | ||
|
|
dcf51f706c | ||
|
|
365b2c50cb | ||
|
|
efcfc0b9a6 | ||
|
|
68e27d6091 | ||
|
|
08ea344fcf | ||
|
|
a6e0955581 | ||
|
|
d8143e2603 | ||
|
|
3077b8a8c0 | ||
|
|
5866713a05 | ||
|
|
7aacf2151c | ||
|
|
e4623bb186 | ||
|
|
c6a089880c | ||
|
|
59e09816c7 | ||
|
|
c3ad9e8c2f | ||
|
|
119b274c19 | ||
|
|
360688f78b | ||
|
|
0a1ac6a70a | ||
|
|
8d27d9d583 | ||
|
|
8bba142e8f | ||
|
|
94d47a3917 | ||
|
|
13fb00a71e | ||
|
|
684a77430c | ||
|
|
3058c050bb | ||
|
|
821ad85e41 | ||
|
|
76ae9aa58f | ||
|
|
a79bc75671 | ||
|
|
795aac241e | ||
|
|
a38db81b71 | ||
|
|
689f106181 | ||
|
|
627ea78e72 | ||
|
|
3162946139 | ||
|
|
c9526dd4d2 | ||
|
|
3c2fd50e8f | ||
|
|
04111db230 | ||
|
|
5a593d657d | ||
|
|
5a67ca35be | ||
|
|
72dabb3664 | ||
|
|
b7314359c8 | ||
|
|
1bf283877e | ||
|
|
1115a0aff5 | ||
|
|
70ad900f59 | ||
|
|
fadc5d7b98 | ||
|
|
85dcc66723 | ||
|
|
f0825bec1d | ||
|
|
0ec6178617 | ||
|
|
0f3e3ebb3b | ||
|
|
9017ef6fdc | ||
|
|
520ef02b98 | ||
|
|
481ca0a8e0 | ||
|
|
28483e2cf3 | ||
|
|
e8dd8089d4 | ||
|
|
4f7091c5d5 | ||
|
|
66148dacf3 | ||
|
|
8ca45f0d77 | ||
|
|
0559bbb9af | ||
|
|
7b28d05373 | ||
|
|
87b9db7579 | ||
|
|
61ffca6290 | ||
|
|
a9e97f6783 | ||
|
|
f8f4016b33 | ||
|
|
59dbb1f88f | ||
|
|
ac75a3136d | ||
|
|
a3af5c0b25 | ||
|
|
847430a0d9 | ||
|
|
55c3156df2 | ||
|
|
e7785dff01 | ||
|
|
6ed34ddd33 | ||
|
|
9f7bc75960 | ||
|
|
bdd7cfd38b | ||
|
|
be3fb6e876 | ||
|
|
d69b65e572 | ||
|
|
e5178d2938 | ||
|
|
e4d00a2da3 | ||
|
|
345b4f64b5 | ||
|
|
a9bc1201d1 | ||
|
|
6a1f35da8f | ||
|
|
d7d1a04751 | ||
|
|
351fe3d15c | ||
|
|
3313a7f0a6 | ||
|
|
867d070263 | ||
|
|
a046bd2021 | ||
|
|
1a49a27344 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -13,7 +13,6 @@ PublishProfiles/
|
||||
*.docstates
|
||||
_ReSharper.*
|
||||
nuget.exe
|
||||
project.lock.json
|
||||
*net45.csproj
|
||||
*net451.csproj
|
||||
*k10.csproj
|
||||
@@ -39,3 +38,5 @@ npm-debug.log
|
||||
/templates/*/ClientApp/dist/
|
||||
/templates/*/yarn.lock
|
||||
.vscode/
|
||||
|
||||
/templates/*/Properties/launchSettings.json
|
||||
|
||||
@@ -10,11 +10,10 @@ addons:
|
||||
- libssl-dev
|
||||
- libunwind8
|
||||
- zlib1g
|
||||
mono:
|
||||
- 4.0.5
|
||||
mono: none
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
osx_image: xcode7.1
|
||||
script:
|
||||
- ./build.sh verify
|
||||
- ./build.sh
|
||||
|
||||
@@ -1,54 +1,68 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26228.4
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{E6E88944-4800-40BA-8AF5-069EA3ADFEB8}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{27304DDE-AFB2-4F8B-B765-E3E2F11E886C}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.NodeServices", "src\Microsoft.AspNetCore.NodeServices\Microsoft.AspNetCore.NodeServices.xproj", "{B0FA4175-8B29-4904-9780-28B3C24B0567}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.NodeServices", "src\Microsoft.AspNetCore.NodeServices\Microsoft.AspNetCore.NodeServices.csproj", "{66B77203-1469-41DF-92F2-2BE6900BD36F}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "NodeServicesExamples", "samples\misc\NodeServicesExamples\NodeServicesExamples.xproj", "{6D4BCDD6-7951-449B-BE55-CB7F014B7430}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.NodeServices.Sockets", "src\Microsoft.AspNetCore.NodeServices.Sockets\Microsoft.AspNetCore.NodeServices.Sockets.csproj", "{F46DEF99-6FAA-4406-B5D8-6FF34EF669E3}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{78DAC76C-1092-45AB-BF0D-594B8C7B6569}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SpaServices", "src\Microsoft.AspNetCore.SpaServices\Microsoft.AspNetCore.SpaServices.csproj", "{66B071A8-EFC8-4A06-BEF6-06B99AE27EEC}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.AngularServices", "src\Microsoft.AspNetCore.AngularServices\Microsoft.AspNetCore.AngularServices.csproj", "{58AAABB6-9D21-42F6-BC97-3DD282B55FD6}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.ReactServices", "src\Microsoft.AspNetCore.ReactServices\Microsoft.AspNetCore.ReactServices.csproj", "{F1081B9A-8D67-4A5E-80C6-615F9A975D4F}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "misc", "misc", "{99EAF1FE-22C8-4526-BE78-74B24125D37F}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.gitignore = .gitignore
|
||||
global.json = global.json
|
||||
README.md = README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "MusicStore", "samples\angular\MusicStore\MusicStore.xproj", "{1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{23836492-E7F4-4376-85BF-A635C304AC46}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ReactGrid", "samples\react\ReactGrid\ReactGrid.xproj", "{ABF90A5B-F4E0-438C-A6E4-9549FB43690B}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "misc", "misc", "{E6A161EA-646C-4033-9090-95BE809AB8D9}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.AngularServices", "src\Microsoft.AspNetCore.AngularServices\Microsoft.AspNetCore.AngularServices.xproj", "{421807E6-B62C-417B-B901-46C5DEDAA8F1}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LatencyTest", "samples\misc\LatencyTest\LatencyTest.csproj", "{1931B19A-EC42-4D56-B2D0-FB06D17244DA}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.ReactServices", "src\Microsoft.AspNetCore.ReactServices\Microsoft.AspNetCore.ReactServices.xproj", "{B04381DE-991F-4831-A0B5-FE1BD3EF80C4}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Webpack", "samples\misc\Webpack\Webpack.csproj", "{DE479DC3-1461-4EAD-A188-4AF7AA4AE344}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.SpaServices", "src\Microsoft.AspNetCore.SpaServices\Microsoft.AspNetCore.SpaServices.xproj", "{4624F728-6DFF-44B6-93B5-3C7D9C94BF3F}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NodeServicesExamples", "samples\misc\NodeServicesExamples\NodeServicesExamples.csproj", "{93EFCC5F-C6EE-4623-894F-A42B22C0B6FE}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Templates", "Templates", "{727E6D58-6830-4792-96C6-E138A33959FB}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "angular", "angular", "{B54435EB-D5E8-4CEC-A02E-DDCB0C750E34}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Angular2Spa", "templates\Angular2Spa\Angular2Spa.xproj", "{8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MusicStore", "samples\angular\MusicStore\MusicStore.csproj", "{63FC66E7-559B-4426-93E1-2D951EFC8293}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ReactReduxSpa", "templates\ReactReduxSpa\ReactReduxSpa.xproj", "{DBFC6DB0-A6D1-4694-A108-1C604B988DA3}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "react", "react", "{BD77E73E-13BC-4550-99DA-51869BD8DFC4}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ReactSpa", "templates\ReactSpa\ReactSpa.xproj", "{E9D1A695-F0E6-46F2-B5E3-72F4AF805387}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReactGrid", "samples\react\ReactGrid\ReactGrid.csproj", "{3B023106-88DB-4C3A-B01F-C1AECB02D80B}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "WebApplicationBasic", "templates\WebApplicationBasic\WebApplicationBasic.xproj", "{CB4398D6-B7F1-449A-AE02-828769679232}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MusicStore", "samples\react\MusicStore\MusicStore.csproj", "{6E898586-79CA-4AA8-946E-943B3682F376}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{E0771531-BE20-40CD-A1B0-A57E09511060}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "templates", "templates", "{1598B415-73F1-4B37-B3B4-0A10677ABB2D}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Webpack", "samples\misc\Webpack\Webpack.xproj", "{A8905301-8492-42FD-9E83-F715A0FDC3A2}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KnockoutSpa", "templates\KnockoutSpa\KnockoutSpa.csproj", "{F60248B1-940E-43FB-BEA0-589362AA6320}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "LatencyTest", "samples\misc\LatencyTest\LatencyTest.xproj", "{A64AF9D9-72AA-4433-BE1D-DC2524B6808A}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Angular2Spa", "templates\Angular2Spa\Angular2Spa.csproj", "{4D4B84C9-13F7-40CA-B05A-DC98FD6019AC}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "React", "React", "{E0EBA813-4478-4C02-B11D-FB3793113FE4}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AureliaSpa", "templates\AureliaSpa\AureliaSpa.csproj", "{4D57B6E1-7141-48ED-959E-872BDD4A2F72}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "MusicStore", "samples\react\MusicStore\MusicStore.xproj", "{C870A92C-9E3F-4BF2-82B8-5758545A8B7C}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReactSpa", "templates\ReactSpa\ReactSpa.csproj", "{868A630E-C61B-4807-B7A8-7EB53BE1C28A}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Angular", "Angular", "{4867A616-83D6-48DC-964D-6AE743596631}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReactReduxSpa", "templates\ReactReduxSpa\ReactReduxSpa.csproj", "{9D4D15A1-A25B-44EC-AB63-F1CE9986712E}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Aurelia", "templates\AureliaSpa\Aurelia.xproj", "{33D8DAD9-74F9-471D-8BAD-55F828FAA736}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebApplicationBasic", "templates\WebApplicationBasic\WebApplicationBasic.csproj", "{86911E07-C733-4C18-B49F-9A007A651246}"
|
||||
EndProject
|
||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "KnockoutSpa", "templates\KnockoutSpa\KnockoutSpa.xproj", "{85231B41-6998-49AE-ABD2-5124C83DBEF2}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{E415FE14-13B0-469F-836D-95059E6BAA6E}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
src\build\common.props = src\build\common.props
|
||||
src\build\Key.snk = src\build\Key.snk
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VueSpa", "templates\VueSpa\VueSpa.csproj", "{49D7665A-20EC-43FC-B8E8-EA0204F2D8C3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -56,89 +70,104 @@ Global
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B0FA4175-8B29-4904-9780-28B3C24B0567}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B0FA4175-8B29-4904-9780-28B3C24B0567}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B0FA4175-8B29-4904-9780-28B3C24B0567}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B0FA4175-8B29-4904-9780-28B3C24B0567}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6D4BCDD6-7951-449B-BE55-CB7F014B7430}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6D4BCDD6-7951-449B-BE55-CB7F014B7430}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6D4BCDD6-7951-449B-BE55-CB7F014B7430}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6D4BCDD6-7951-449B-BE55-CB7F014B7430}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{ABF90A5B-F4E0-438C-A6E4-9549FB43690B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{ABF90A5B-F4E0-438C-A6E4-9549FB43690B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{ABF90A5B-F4E0-438C-A6E4-9549FB43690B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{ABF90A5B-F4E0-438C-A6E4-9549FB43690B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{421807E6-B62C-417B-B901-46C5DEDAA8F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{421807E6-B62C-417B-B901-46C5DEDAA8F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{421807E6-B62C-417B-B901-46C5DEDAA8F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{421807E6-B62C-417B-B901-46C5DEDAA8F1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B04381DE-991F-4831-A0B5-FE1BD3EF80C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B04381DE-991F-4831-A0B5-FE1BD3EF80C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B04381DE-991F-4831-A0B5-FE1BD3EF80C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B04381DE-991F-4831-A0B5-FE1BD3EF80C4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4624F728-6DFF-44B6-93B5-3C7D9C94BF3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4624F728-6DFF-44B6-93B5-3C7D9C94BF3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4624F728-6DFF-44B6-93B5-3C7D9C94BF3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4624F728-6DFF-44B6-93B5-3C7D9C94BF3F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DBFC6DB0-A6D1-4694-A108-1C604B988DA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DBFC6DB0-A6D1-4694-A108-1C604B988DA3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DBFC6DB0-A6D1-4694-A108-1C604B988DA3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DBFC6DB0-A6D1-4694-A108-1C604B988DA3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E9D1A695-F0E6-46F2-B5E3-72F4AF805387}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E9D1A695-F0E6-46F2-B5E3-72F4AF805387}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E9D1A695-F0E6-46F2-B5E3-72F4AF805387}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E9D1A695-F0E6-46F2-B5E3-72F4AF805387}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CB4398D6-B7F1-449A-AE02-828769679232}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CB4398D6-B7F1-449A-AE02-828769679232}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CB4398D6-B7F1-449A-AE02-828769679232}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CB4398D6-B7F1-449A-AE02-828769679232}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A8905301-8492-42FD-9E83-F715A0FDC3A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A8905301-8492-42FD-9E83-F715A0FDC3A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A8905301-8492-42FD-9E83-F715A0FDC3A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A8905301-8492-42FD-9E83-F715A0FDC3A2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A64AF9D9-72AA-4433-BE1D-DC2524B6808A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A64AF9D9-72AA-4433-BE1D-DC2524B6808A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A64AF9D9-72AA-4433-BE1D-DC2524B6808A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A64AF9D9-72AA-4433-BE1D-DC2524B6808A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C870A92C-9E3F-4BF2-82B8-5758545A8B7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C870A92C-9E3F-4BF2-82B8-5758545A8B7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C870A92C-9E3F-4BF2-82B8-5758545A8B7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C870A92C-9E3F-4BF2-82B8-5758545A8B7C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{33D8DAD9-74F9-471D-8BAD-55F828FAA736}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{33D8DAD9-74F9-471D-8BAD-55F828FAA736}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{33D8DAD9-74F9-471D-8BAD-55F828FAA736}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{33D8DAD9-74F9-471D-8BAD-55F828FAA736}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{85231B41-6998-49AE-ABD2-5124C83DBEF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{85231B41-6998-49AE-ABD2-5124C83DBEF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{85231B41-6998-49AE-ABD2-5124C83DBEF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{85231B41-6998-49AE-ABD2-5124C83DBEF2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{66B77203-1469-41DF-92F2-2BE6900BD36F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{66B77203-1469-41DF-92F2-2BE6900BD36F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{66B77203-1469-41DF-92F2-2BE6900BD36F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{66B77203-1469-41DF-92F2-2BE6900BD36F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F46DEF99-6FAA-4406-B5D8-6FF34EF669E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F46DEF99-6FAA-4406-B5D8-6FF34EF669E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F46DEF99-6FAA-4406-B5D8-6FF34EF669E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F46DEF99-6FAA-4406-B5D8-6FF34EF669E3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{66B071A8-EFC8-4A06-BEF6-06B99AE27EEC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{66B071A8-EFC8-4A06-BEF6-06B99AE27EEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{66B071A8-EFC8-4A06-BEF6-06B99AE27EEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{66B071A8-EFC8-4A06-BEF6-06B99AE27EEC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{58AAABB6-9D21-42F6-BC97-3DD282B55FD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{58AAABB6-9D21-42F6-BC97-3DD282B55FD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{58AAABB6-9D21-42F6-BC97-3DD282B55FD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{58AAABB6-9D21-42F6-BC97-3DD282B55FD6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F1081B9A-8D67-4A5E-80C6-615F9A975D4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F1081B9A-8D67-4A5E-80C6-615F9A975D4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F1081B9A-8D67-4A5E-80C6-615F9A975D4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F1081B9A-8D67-4A5E-80C6-615F9A975D4F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1931B19A-EC42-4D56-B2D0-FB06D17244DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1931B19A-EC42-4D56-B2D0-FB06D17244DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1931B19A-EC42-4D56-B2D0-FB06D17244DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1931B19A-EC42-4D56-B2D0-FB06D17244DA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DE479DC3-1461-4EAD-A188-4AF7AA4AE344}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DE479DC3-1461-4EAD-A188-4AF7AA4AE344}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DE479DC3-1461-4EAD-A188-4AF7AA4AE344}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DE479DC3-1461-4EAD-A188-4AF7AA4AE344}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{93EFCC5F-C6EE-4623-894F-A42B22C0B6FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{93EFCC5F-C6EE-4623-894F-A42B22C0B6FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{93EFCC5F-C6EE-4623-894F-A42B22C0B6FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{93EFCC5F-C6EE-4623-894F-A42B22C0B6FE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{63FC66E7-559B-4426-93E1-2D951EFC8293}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{63FC66E7-559B-4426-93E1-2D951EFC8293}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{63FC66E7-559B-4426-93E1-2D951EFC8293}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{63FC66E7-559B-4426-93E1-2D951EFC8293}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3B023106-88DB-4C3A-B01F-C1AECB02D80B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3B023106-88DB-4C3A-B01F-C1AECB02D80B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3B023106-88DB-4C3A-B01F-C1AECB02D80B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3B023106-88DB-4C3A-B01F-C1AECB02D80B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6E898586-79CA-4AA8-946E-943B3682F376}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6E898586-79CA-4AA8-946E-943B3682F376}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6E898586-79CA-4AA8-946E-943B3682F376}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6E898586-79CA-4AA8-946E-943B3682F376}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F60248B1-940E-43FB-BEA0-589362AA6320}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F60248B1-940E-43FB-BEA0-589362AA6320}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F60248B1-940E-43FB-BEA0-589362AA6320}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F60248B1-940E-43FB-BEA0-589362AA6320}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4D4B84C9-13F7-40CA-B05A-DC98FD6019AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4D4B84C9-13F7-40CA-B05A-DC98FD6019AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4D4B84C9-13F7-40CA-B05A-DC98FD6019AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4D4B84C9-13F7-40CA-B05A-DC98FD6019AC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4D57B6E1-7141-48ED-959E-872BDD4A2F72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4D57B6E1-7141-48ED-959E-872BDD4A2F72}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4D57B6E1-7141-48ED-959E-872BDD4A2F72}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4D57B6E1-7141-48ED-959E-872BDD4A2F72}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{868A630E-C61B-4807-B7A8-7EB53BE1C28A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{868A630E-C61B-4807-B7A8-7EB53BE1C28A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{868A630E-C61B-4807-B7A8-7EB53BE1C28A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{868A630E-C61B-4807-B7A8-7EB53BE1C28A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9D4D15A1-A25B-44EC-AB63-F1CE9986712E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9D4D15A1-A25B-44EC-AB63-F1CE9986712E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9D4D15A1-A25B-44EC-AB63-F1CE9986712E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9D4D15A1-A25B-44EC-AB63-F1CE9986712E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{86911E07-C733-4C18-B49F-9A007A651246}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{86911E07-C733-4C18-B49F-9A007A651246}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{86911E07-C733-4C18-B49F-9A007A651246}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{86911E07-C733-4C18-B49F-9A007A651246}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{49D7665A-20EC-43FC-B8E8-EA0204F2D8C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{49D7665A-20EC-43FC-B8E8-EA0204F2D8C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{49D7665A-20EC-43FC-B8E8-EA0204F2D8C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{49D7665A-20EC-43FC-B8E8-EA0204F2D8C3}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{6D4BCDD6-7951-449B-BE55-CB7F014B7430} = {E0771531-BE20-40CD-A1B0-A57E09511060}
|
||||
{1A74148F-9DC0-435D-B5AC-7D1B0D3D5E0B} = {4867A616-83D6-48DC-964D-6AE743596631}
|
||||
{ABF90A5B-F4E0-438C-A6E4-9549FB43690B} = {E0EBA813-4478-4C02-B11D-FB3793113FE4}
|
||||
{8F5CB8A9-3086-4B49-A1C2-32A9F89BCA11} = {727E6D58-6830-4792-96C6-E138A33959FB}
|
||||
{DBFC6DB0-A6D1-4694-A108-1C604B988DA3} = {727E6D58-6830-4792-96C6-E138A33959FB}
|
||||
{E9D1A695-F0E6-46F2-B5E3-72F4AF805387} = {727E6D58-6830-4792-96C6-E138A33959FB}
|
||||
{CB4398D6-B7F1-449A-AE02-828769679232} = {727E6D58-6830-4792-96C6-E138A33959FB}
|
||||
{E0771531-BE20-40CD-A1B0-A57E09511060} = {E6E88944-4800-40BA-8AF5-069EA3ADFEB8}
|
||||
{A8905301-8492-42FD-9E83-F715A0FDC3A2} = {E0771531-BE20-40CD-A1B0-A57E09511060}
|
||||
{A64AF9D9-72AA-4433-BE1D-DC2524B6808A} = {E0771531-BE20-40CD-A1B0-A57E09511060}
|
||||
{E0EBA813-4478-4C02-B11D-FB3793113FE4} = {E6E88944-4800-40BA-8AF5-069EA3ADFEB8}
|
||||
{C870A92C-9E3F-4BF2-82B8-5758545A8B7C} = {E0EBA813-4478-4C02-B11D-FB3793113FE4}
|
||||
{4867A616-83D6-48DC-964D-6AE743596631} = {E6E88944-4800-40BA-8AF5-069EA3ADFEB8}
|
||||
{33D8DAD9-74F9-471D-8BAD-55F828FAA736} = {727E6D58-6830-4792-96C6-E138A33959FB}
|
||||
{85231B41-6998-49AE-ABD2-5124C83DBEF2} = {727E6D58-6830-4792-96C6-E138A33959FB}
|
||||
{66B77203-1469-41DF-92F2-2BE6900BD36F} = {27304DDE-AFB2-4F8B-B765-E3E2F11E886C}
|
||||
{F46DEF99-6FAA-4406-B5D8-6FF34EF669E3} = {27304DDE-AFB2-4F8B-B765-E3E2F11E886C}
|
||||
{66B071A8-EFC8-4A06-BEF6-06B99AE27EEC} = {27304DDE-AFB2-4F8B-B765-E3E2F11E886C}
|
||||
{58AAABB6-9D21-42F6-BC97-3DD282B55FD6} = {27304DDE-AFB2-4F8B-B765-E3E2F11E886C}
|
||||
{F1081B9A-8D67-4A5E-80C6-615F9A975D4F} = {27304DDE-AFB2-4F8B-B765-E3E2F11E886C}
|
||||
{E6A161EA-646C-4033-9090-95BE809AB8D9} = {23836492-E7F4-4376-85BF-A635C304AC46}
|
||||
{1931B19A-EC42-4D56-B2D0-FB06D17244DA} = {E6A161EA-646C-4033-9090-95BE809AB8D9}
|
||||
{DE479DC3-1461-4EAD-A188-4AF7AA4AE344} = {E6A161EA-646C-4033-9090-95BE809AB8D9}
|
||||
{93EFCC5F-C6EE-4623-894F-A42B22C0B6FE} = {E6A161EA-646C-4033-9090-95BE809AB8D9}
|
||||
{B54435EB-D5E8-4CEC-A02E-DDCB0C750E34} = {23836492-E7F4-4376-85BF-A635C304AC46}
|
||||
{63FC66E7-559B-4426-93E1-2D951EFC8293} = {B54435EB-D5E8-4CEC-A02E-DDCB0C750E34}
|
||||
{BD77E73E-13BC-4550-99DA-51869BD8DFC4} = {23836492-E7F4-4376-85BF-A635C304AC46}
|
||||
{3B023106-88DB-4C3A-B01F-C1AECB02D80B} = {BD77E73E-13BC-4550-99DA-51869BD8DFC4}
|
||||
{6E898586-79CA-4AA8-946E-943B3682F376} = {BD77E73E-13BC-4550-99DA-51869BD8DFC4}
|
||||
{F60248B1-940E-43FB-BEA0-589362AA6320} = {1598B415-73F1-4B37-B3B4-0A10677ABB2D}
|
||||
{4D4B84C9-13F7-40CA-B05A-DC98FD6019AC} = {1598B415-73F1-4B37-B3B4-0A10677ABB2D}
|
||||
{4D57B6E1-7141-48ED-959E-872BDD4A2F72} = {1598B415-73F1-4B37-B3B4-0A10677ABB2D}
|
||||
{868A630E-C61B-4807-B7A8-7EB53BE1C28A} = {1598B415-73F1-4B37-B3B4-0A10677ABB2D}
|
||||
{9D4D15A1-A25B-44EC-AB63-F1CE9986712E} = {1598B415-73F1-4B37-B3B4-0A10677ABB2D}
|
||||
{86911E07-C733-4C18-B49F-9A007A651246} = {1598B415-73F1-4B37-B3B4-0A10677ABB2D}
|
||||
{E415FE14-13B0-469F-836D-95059E6BAA6E} = {27304DDE-AFB2-4F8B-B765-E3E2F11E886C}
|
||||
{49D7665A-20EC-43FC-B8E8-EA0204F2D8C3} = {1598B415-73F1-4B37-B3B4-0A10677ABB2D}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
8
NuGet.config
Normal file
8
NuGet.config
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json" />
|
||||
<add key="AspNetCoreTools" value="https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json" />
|
||||
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="AspNetVNext" value="https://www.myget.org/f/aspnetmaster/api/v3/index.json" />
|
||||
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
25
appveyor.yml
25
appveyor.yml
@@ -25,20 +25,23 @@ build_script:
|
||||
artifacts:
|
||||
- path: templates\package-builder\dist\artifacts\generator-aspnetcore-spa.tar.gz
|
||||
name: generator-aspnetcore-spa
|
||||
# - build.cmd verify
|
||||
- path: templates\package-builder\dist\artifacts\*.nupkg
|
||||
name: Microsoft.AspNetCore.SpaTemplates
|
||||
type: NuGetPackage
|
||||
# - ps: .\build.ps1
|
||||
clone_depth: 1
|
||||
test_script:
|
||||
- dotnet restore ./src
|
||||
- npm install -g selenium-standalone
|
||||
- selenium-standalone install
|
||||
# - dotnet restore ./src
|
||||
# - npm install -g selenium-standalone
|
||||
# - selenium-standalone install
|
||||
# The nosys flag is needed for selenium to work on Appveyor
|
||||
- ps: Start-Process selenium-standalone 'start','--','-Djna.nosys=true'
|
||||
- ps: Push-Location
|
||||
- cd test
|
||||
- npm install
|
||||
- npm test
|
||||
# - ps: Start-Process selenium-standalone 'start','--','-Djna.nosys=true'
|
||||
# - ps: Push-Location
|
||||
# - cd test
|
||||
# - npm install
|
||||
# - npm test
|
||||
on_finish :
|
||||
- ps: Pop-Location
|
||||
# - ps: Pop-Location
|
||||
# After running tests, upload results to Appveyor
|
||||
- ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test\tmp\junit\*.xml))
|
||||
# - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test\tmp\junit\*.xml))
|
||||
deploy: off
|
||||
|
||||
@@ -64,4 +64,4 @@ if (!(Test-Path $buildFolder)) {
|
||||
}
|
||||
}
|
||||
|
||||
&"$buildFile" $args
|
||||
&"$buildFile" @args
|
||||
|
||||
18
build/common.props
Normal file
18
build/common.props
Normal file
@@ -0,0 +1,18 @@
|
||||
<Project>
|
||||
|
||||
<Import Project="dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<Product>Microsoft ASP.NET Core</Product>
|
||||
<RepositoryUrl>https://github.com/aspnet/javascriptservices</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Key.snk</AssemblyOriginatorKeyFile>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Internal.AspNetCore.Sdk" Version="1.0.1-*" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
13
build/dependencies.props
Normal file
13
build/dependencies.props
Normal file
@@ -0,0 +1,13 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<AspNetCoreVersion>1.1.0</AspNetCoreVersion>
|
||||
<AspNetCoreMvcVersion>1.1.1</AspNetCoreMvcVersion>
|
||||
<AspNetCoreToolsVersion>1.0.0-msbuild3-final</AspNetCoreToolsVersion>
|
||||
<AutoMapperVersion>5.0.2</AutoMapperVersion>
|
||||
<CoreFxVersion>4.3.0</CoreFxVersion>
|
||||
<JsonNetVersion>10.0.1</JsonNetVersion>
|
||||
<MicrosoftDataflowVersion>4.5.24</MicrosoftDataflowVersion>
|
||||
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
|
||||
<ThreadingDataflowVersion>4.7.0</ThreadingDataflowVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
12
build/repo.targets
Normal file
12
build/repo.targets
Normal file
@@ -0,0 +1,12 @@
|
||||
<Project>
|
||||
<Target Name="NpmRestore" AfterTargets="Restore" Condition="'$(PreflightRestore)' != 'true'">
|
||||
<ItemGroup>
|
||||
<NpmModules Include="$(RepositoryRoot)**\package.json"
|
||||
Exclude="$(RepositoryRoot)**\node_modules\**\*" />
|
||||
</ItemGroup>
|
||||
|
||||
<Message Text="Restoring NPM modules for: %0A - @(NpmModules -> '%(FullPath)','%0A - ')" Importance="high" />
|
||||
|
||||
<Exec Command="npm install" WorkingDirectory="%(NpmModules.RootDir)%(Directory)" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"projects": ["src"],
|
||||
"sdk": { "version": "1.0.0-preview2-1-003177" }
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
|
||||
var VERSION='0.1'
|
||||
var FULL_VERSION='0.1'
|
||||
var AUTHORS='Microsoft Open Technologies, Inc.'
|
||||
var TEST_PROJECT_GLOB='templates/*/project.json'
|
||||
var SAMPLES_PROJECT_GLOB='samples/misc/*/project.json'
|
||||
|
||||
@{
|
||||
// The build quality values are set in each of the project.json files
|
||||
BuildQuality = "";
|
||||
}
|
||||
|
||||
use-standard-lifecycle
|
||||
k-standard-goals
|
||||
@@ -1,23 +0,0 @@
|
||||
versionSuffix=$1
|
||||
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
projects=(
|
||||
./src/Microsoft.AspNetCore.NodeServices
|
||||
./src/Microsoft.AspNetCore.NodeServices.Sockets
|
||||
./src/Microsoft.AspNetCore.SpaServices
|
||||
./src/Microsoft.AspNetCore.AngularServices
|
||||
./src/Microsoft.AspNetCore.ReactServices
|
||||
)
|
||||
|
||||
if [ -z "$versionSuffix" ]; then
|
||||
echo "Usage: pack-local.sh <versionsuffix>"
|
||||
echo "Example: pack-local.sh beta-000001"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pushd $dir > /dev/null
|
||||
|
||||
for proj in "${projects[@]}"; do
|
||||
dotnet pack $proj --version-suffix $versionSuffix -o ./artifacts/
|
||||
done
|
||||
|
||||
popd > /dev/null
|
||||
1
samples/angular/MusicStore/.gitignore
vendored
1
samples/angular/MusicStore/.gitignore
vendored
@@ -1,7 +1,6 @@
|
||||
/node_modules/
|
||||
/wwwroot/lib/
|
||||
/wwwroot/ng-app/**/*.js
|
||||
/project.lock.json
|
||||
/music-db.sqlite
|
||||
/Properties/launchSettings.json
|
||||
|
||||
|
||||
31
samples/angular/MusicStore/MusicStore.csproj
Normal file
31
samples/angular/MusicStore/MusicStore.csproj
Normal file
@@ -0,0 +1,31 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<Import Project="..\..\..\build\dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AspNetCore.AngularServices\Microsoft.AspNetCore.AngularServices.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SQLite" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="AutoMapper" Version="$(AutoMapperVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
|
||||
<Exec Command="npm install" />
|
||||
<Exec Command="gulp" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>1a74148f-9dc0-435d-b5ac-7d1b0d3d5e0b</ProjectGuid>
|
||||
<RootNamespace>MusicStore</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<DevelopmentServerPort>5068</DevelopmentServerPort>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
||||
@@ -1,79 +0,0 @@
|
||||
{
|
||||
"version": "1.0.0-*",
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true,
|
||||
"preserveCompilationContext": true
|
||||
},
|
||||
"runtimeOptions": {
|
||||
"configProperties": {
|
||||
"System.GC.Server": true
|
||||
}
|
||||
},
|
||||
"tooling": {
|
||||
"defaultNamespace": "MusicStore"
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.1.0",
|
||||
"type": "platform"
|
||||
},
|
||||
"Microsoft.AspNetCore.AngularServices": "1.1.0-*",
|
||||
"Microsoft.AspNetCore.Diagnostics": "1.1.0",
|
||||
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.0",
|
||||
"Microsoft.AspNetCore.Mvc": "1.1.0",
|
||||
"Microsoft.AspNetCore.Razor.Tools": {
|
||||
"version": "1.0.0-preview2-final",
|
||||
"type": "build"
|
||||
},
|
||||
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
|
||||
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
|
||||
"Microsoft.AspNetCore.StaticFiles": "1.1.0",
|
||||
"Microsoft.EntityFrameworkCore.SQLite": "1.1.0",
|
||||
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
|
||||
"Microsoft.Extensions.Configuration.Json": "1.1.0",
|
||||
"Microsoft.Extensions.Configuration.CommandLine": "1.1.0",
|
||||
"Microsoft.Extensions.Logging": "1.1.0",
|
||||
"Microsoft.Extensions.Logging.Console": "1.1.0",
|
||||
"Microsoft.Extensions.Logging.Debug": "1.1.0",
|
||||
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0",
|
||||
"AutoMapper": "5.0.2"
|
||||
},
|
||||
|
||||
"tools": {
|
||||
"Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
|
||||
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
|
||||
"Microsoft.DotNet.Watcher.Tools": "1.0.0-preview2-final"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"netcoreapp1.1": {
|
||||
"imports": [
|
||||
"dotnet5.6",
|
||||
"portable-net45+win8"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"publishOptions": {
|
||||
"include": [
|
||||
"appsettings.json",
|
||||
"ClientApp",
|
||||
"node_modules",
|
||||
"typings",
|
||||
"Views",
|
||||
"tsconfig.json",
|
||||
"tsd.json",
|
||||
"web.config",
|
||||
"webpack.*.js",
|
||||
"wwwroot"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": [
|
||||
"npm install",
|
||||
"gulp"
|
||||
],
|
||||
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
|
||||
}
|
||||
}
|
||||
19
samples/misc/LatencyTest/LatencyTest.csproj
Normal file
19
samples/misc/LatencyTest/LatencyTest.csproj
Normal file
@@ -0,0 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\..\build\dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AspNetCore.NodeServices\Microsoft.AspNetCore.NodeServices.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AspNetCore.NodeServices.Sockets\Microsoft.AspNetCore.NodeServices.Sockets.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(AspNetCoreVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0.25123" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.25123</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>a64af9d9-72aa-4433-be1d-dc2524b6808a</ProjectGuid>
|
||||
<RootNamespace>LatencyTest</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"version": "1.0.0-*",
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.1.0",
|
||||
"type": "platform"
|
||||
},
|
||||
"Microsoft.AspNetCore.NodeServices": "1.1.0-*",
|
||||
"Microsoft.AspNetCore.NodeServices.Sockets": "1.1.0-*",
|
||||
"Microsoft.Extensions.DependencyInjection": "1.1.0"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"imports": "dnxcore50"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.NodeServices;
|
||||
|
||||
namespace NodeServicesExamples.Controllers
|
||||
{
|
||||
@@ -15,8 +16,21 @@ namespace NodeServicesExamples.Controllers
|
||||
return View();
|
||||
}
|
||||
|
||||
public IActionResult ImageResizing()
|
||||
public async Task<IActionResult> Chart([FromServices] INodeServices nodeServices)
|
||||
{
|
||||
var options = new { width = 400, height = 200, showArea = true, showPoint = true, fullWidth = true };
|
||||
var data = new
|
||||
{
|
||||
labels = new[] { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" },
|
||||
series = new[] {
|
||||
new[] { 1, 5, 2, 5, 4, 3 },
|
||||
new[] { 2, 3, 4, 8, 1, 2 },
|
||||
new[] { 5, 4, 3, 2, 1, 0 }
|
||||
}
|
||||
};
|
||||
|
||||
ViewData["ChartMarkup"] = await nodeServices.InvokeAsync<string>("./Node/renderChart", "line", options, data);
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.NodeServices;
|
||||
using Microsoft.AspNetCore.StaticFiles;
|
||||
|
||||
namespace NodeServicesExamples.Controllers
|
||||
{
|
||||
public class ResizeImageController : Controller
|
||||
{
|
||||
private const int MaxDimension = 1000;
|
||||
private static string[] AllowedMimeTypes = new[] { "image/jpeg", "image/png", "image/gif" };
|
||||
|
||||
private IHostingEnvironment _environment;
|
||||
private INodeServices _nodeServices;
|
||||
|
||||
public ResizeImageController(IHostingEnvironment environment, INodeServices nodeServices)
|
||||
{
|
||||
_environment = environment;
|
||||
_nodeServices = nodeServices;
|
||||
}
|
||||
|
||||
[Route("resize/{*imagePath}")]
|
||||
public async Task<IActionResult> Index(string imagePath, int maxWidth, int maxHeight)
|
||||
{
|
||||
// Validate incoming params
|
||||
if (maxWidth < 0 || maxHeight < 0 || maxWidth > MaxDimension || maxHeight > MaxDimension
|
||||
|| (maxWidth + maxHeight) == 0)
|
||||
{
|
||||
return BadRequest("Invalid dimensions");
|
||||
}
|
||||
|
||||
var mimeType = GetContentType(imagePath);
|
||||
if (Array.IndexOf(AllowedMimeTypes, mimeType) < 0)
|
||||
{
|
||||
return BadRequest("Disallowed image format");
|
||||
}
|
||||
|
||||
// Locate source image on disk
|
||||
var fileInfo = _environment.WebRootFileProvider.GetFileInfo(imagePath);
|
||||
if (!fileInfo.Exists)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
// Invoke Node and pipe the result to the response
|
||||
var imageStream = await _nodeServices.InvokeAsync<Stream>(
|
||||
"./Node/resizeImage",
|
||||
fileInfo.PhysicalPath,
|
||||
mimeType,
|
||||
maxWidth,
|
||||
maxHeight);
|
||||
return File(imageStream, mimeType);
|
||||
}
|
||||
|
||||
private string GetContentType(string path)
|
||||
{
|
||||
string result;
|
||||
return new FileExtensionContentTypeProvider().TryGetContentType(path, out result) ? result : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
8
samples/misc/NodeServicesExamples/Node/renderChart.js
Normal file
8
samples/misc/NodeServicesExamples/Node/renderChart.js
Normal file
@@ -0,0 +1,8 @@
|
||||
var generate = require('node-chartist');
|
||||
|
||||
module.exports = function (callback, type, options, data) {
|
||||
generate(type, options, data).then(
|
||||
result => callback(null, result), // Success case
|
||||
error => callback(error) // Error case
|
||||
);
|
||||
};
|
||||
@@ -1,8 +0,0 @@
|
||||
var sharp = require('sharp');
|
||||
|
||||
module.exports = function(result, physicalPath, mimeType, maxWidth, maxHeight) {
|
||||
// Invoke the 'sharp' NPM module, and have it pipe the resulting image data back to .NET
|
||||
sharp(physicalPath)
|
||||
.resize(maxWidth || null, maxHeight || null)
|
||||
.pipe(result.stream);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<Import Project="..\..\..\build\dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AspNetCore.NodeServices\Microsoft.AspNetCore.NodeServices.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(AspNetCoreVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
|
||||
<Exec Command="npm install" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>6d4bcdd6-7951-449b-be55-cb7f014b7430</ProjectGuid>
|
||||
<RootNamespace>NodeServicesExamples</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\..\JavaScriptServices.sln\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<DevelopmentServerPort>2018</DevelopmentServerPort>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
||||
12
samples/misc/NodeServicesExamples/Views/Home/Chart.cshtml
Normal file
12
samples/misc/NodeServicesExamples/Views/Home/Chart.cshtml
Normal file
@@ -0,0 +1,12 @@
|
||||
<h1>Server-rendered chart</h1>
|
||||
|
||||
<p>
|
||||
This sample demonstrates how arbitrary NPM modules can be invoked from .NET code.
|
||||
</p>
|
||||
<p>
|
||||
In this case, we use <code>node-chartist</code> to render the following chart on the server. The output is
|
||||
identical to what you'd get if you used <a href='https://gionkunz.github.io/chartist-js/'>chartist.js</a>
|
||||
on the client, except that in this example, we're not executing any client-side code at all.
|
||||
</p>
|
||||
|
||||
@Html.Raw(ViewData["ChartMarkup"])
|
||||
@@ -1,34 +0,0 @@
|
||||
<h1>Image Resizing</h1>
|
||||
|
||||
<p>
|
||||
This sample shows how the NPM module <a href="https://www.npmjs.com/package/sharp"><code>sharp</code></a>
|
||||
can be used for dynamic image resizing from within an ASP.NET Core application. There is one copy of the
|
||||
following image on disk, but we can set up an MVC action method that returns it resized to fit within an
|
||||
arbitrary width and height.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Dependencies:</strong> On Windows and Linux, there are no native dependencies. Just running
|
||||
<code>npm install</code> is enough. On OS X, however, you need to have <code>libvips</code> installed,
|
||||
which you can get through <a href="http://brew.sh/">Homebrew</a> by running
|
||||
<code>brew install homebrew/science/vips</code>.
|
||||
</p>
|
||||
|
||||
<h3>100px wide [<a href="/resize/images/parrot.jpg?maxWidth=100">open</a>]</h3>
|
||||
<img src="/resize/images/parrot.jpg?maxWidth=100" />
|
||||
|
||||
<h3>200px wide [<a href="/resize/images/parrot.jpg?maxWidth=200">open</a>]</h3>
|
||||
<img src="/resize/images/parrot.jpg?maxWidth=200" />
|
||||
|
||||
<h3>400px wide [<a href="/resize/images/parrot.jpg?maxWidth=400">open</a>]</h3>
|
||||
<img src="/resize/images/parrot.jpg?maxWidth=400" />
|
||||
|
||||
<h3>800px wide [<a href="/resize/images/parrot.jpg?maxWidth=800">open</a>]</h3>
|
||||
<img src="/resize/images/parrot.jpg?maxWidth=800" />
|
||||
|
||||
<p>
|
||||
<strong>Credit:</strong>
|
||||
<em><a href="https://www.flickr.com/photos/dcoetzee/3572948635">Parrot</a>
|
||||
by <a href="https://www.flickr.com/photos/dcoetzee/">D Coetzee</a>
|
||||
is dedicated to the <a href="http://creativecommons.org/publicdomain/zero/1.0/">public domain (CC0)</a></em>
|
||||
</p>
|
||||
@@ -7,7 +7,6 @@
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><a asp-action="ES2015Transpilation">ES2015 transpilation</a>
|
||||
<li><a asp-action="ImageResizing">Image resizing</a>
|
||||
</li>
|
||||
|
||||
<li><a asp-action="ES2015Transpilation">ES2015 transpilation</a></li>
|
||||
<li><a asp-action="Chart">Server-side chart rendering</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<!doctype html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>NodeServices Examples</title>
|
||||
<link rel="stylesheet" href="~/css/chartist.min.css" />
|
||||
</head>
|
||||
<body>
|
||||
@RenderBody()
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
"dependencies": {
|
||||
"babel-core": "^6.7.4",
|
||||
"babel-preset-es2015": "^6.6.0",
|
||||
"sharp": "^0.15.0"
|
||||
"node-chartist": "^1.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
{
|
||||
"version": "1.0.0-*",
|
||||
"tooling": {
|
||||
"defaultNamespace": "NodeServicesExamples"
|
||||
},
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true,
|
||||
"preserveCompilationContext": true
|
||||
},
|
||||
"runtimeOptions": {
|
||||
"gcServer": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.1.0",
|
||||
"type": "platform"
|
||||
},
|
||||
"Microsoft.AspNetCore.Diagnostics": "1.1.0",
|
||||
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
|
||||
"Microsoft.AspNetCore.Mvc": "1.1.0",
|
||||
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.1.0",
|
||||
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
|
||||
"Microsoft.AspNetCore.StaticFiles": "1.1.0",
|
||||
"Microsoft.Extensions.Configuration.Json": "1.1.0",
|
||||
"Microsoft.Extensions.Logging.Console": "1.1.0",
|
||||
"Microsoft.Extensions.Logging.Debug": "1.1.0",
|
||||
"Microsoft.AspNetCore.NodeServices": "1.1.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
},
|
||||
"publishExclude": [
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"**.xproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
],
|
||||
"scripts": {
|
||||
"prepublish": [ "npm install" ],
|
||||
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
|
||||
}
|
||||
}
|
||||
1
samples/misc/NodeServicesExamples/wwwroot/css/chartist.min.css
vendored
Normal file
1
samples/misc/NodeServicesExamples/wwwroot/css/chartist.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 2.5 MiB |
4
samples/misc/Webpack/.gitignore
vendored
4
samples/misc/Webpack/.gitignore
vendored
@@ -43,10 +43,6 @@ TestResult.xml
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# DNX
|
||||
project.lock.json
|
||||
artifacts/
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
FROM microsoft/aspnet:1.0.0-rc1-update1
|
||||
|
||||
RUN printf "deb http://ftp.us.debian.org/debian jessie main\n" >> /etc/apt/sources.list
|
||||
RUN apt-get -qq update && apt-get install -qqy sqlite3 libsqlite3-dev && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
RUN ["dnu", "restore"]
|
||||
|
||||
EXPOSE 5000/tcp
|
||||
ENTRYPOINT ["dnx", "-p", "project.json", "web"]
|
||||
26
samples/misc/Webpack/Webpack.csproj
Normal file
26
samples/misc/Webpack/Webpack.csproj
Normal file
@@ -0,0 +1,26 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<Import Project="..\..\..\build\dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AspNetCore.SpaServices\Microsoft.AspNetCore.SpaServices.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(AspNetCoreVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
|
||||
<Exec Command="npm install" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>a8905301-8492-42fd-9e83-f715a0fdc3a2</ProjectGuid>
|
||||
<RootNamespace>Webpack</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\..\JavaScriptServices.sln\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<DevelopmentServerPort>2018</DevelopmentServerPort>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
||||
@@ -1,45 +0,0 @@
|
||||
{
|
||||
"version": "1.0.0-*",
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true,
|
||||
"preserveCompilationContext": true
|
||||
},
|
||||
"runtimeOptions": {
|
||||
"gcServer": true
|
||||
},
|
||||
"tooling": {
|
||||
"defaultNamespace": "Webpack"
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.1.0",
|
||||
"type": "platform"
|
||||
},
|
||||
"Microsoft.AspNetCore.Diagnostics": "1.1.0",
|
||||
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
|
||||
"Microsoft.AspNetCore.Mvc": "1.1.0",
|
||||
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.1.0",
|
||||
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
|
||||
"Microsoft.AspNetCore.StaticFiles": "1.1.0",
|
||||
"Microsoft.Extensions.Configuration.Json": "1.1.0",
|
||||
"Microsoft.Extensions.Logging.Console": "1.1.0",
|
||||
"Microsoft.Extensions.Logging.Debug": "1.1.0",
|
||||
"Microsoft.AspNetCore.SpaServices": "1.1.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
},
|
||||
"publishOptions": {
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"**.xproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": [ "npm install" ],
|
||||
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
|
||||
}
|
||||
}
|
||||
39
samples/react/MusicStore/MusicStore.csproj
Normal file
39
samples/react/MusicStore/MusicStore.csproj
Normal file
@@ -0,0 +1,39 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<Import Project="..\..\..\build\dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="node_modules\**\*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AspNetCore.ReactServices\Microsoft.AspNetCore.ReactServices.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SQLite" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="AutoMapper" Version="$(AutoMapperVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
|
||||
<Exec Command="npm install" />
|
||||
<Exec Command="node node_modules/webpack/bin/webpack.js" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="$(AspNetCoreToolsVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>c870a92c-9e3f-4bf2-82b8-5758545a8b7c</ProjectGuid>
|
||||
<RootNamespace>MusicStore</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\..\JavaScriptServices.sln\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<DevelopmentServerPort>2018</DevelopmentServerPort>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
||||
@@ -1,80 +0,0 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.1.0",
|
||||
"type": "platform"
|
||||
},
|
||||
"Microsoft.AspNetCore.ReactServices": "1.1.0-*",
|
||||
"Microsoft.AspNetCore.Diagnostics": "1.1.0",
|
||||
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.0",
|
||||
"Microsoft.AspNetCore.Mvc": "1.1.0",
|
||||
"Microsoft.AspNetCore.Razor.Tools": {
|
||||
"version": "1.0.0-preview2-final",
|
||||
"type": "build"
|
||||
},
|
||||
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
|
||||
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
|
||||
"Microsoft.AspNetCore.StaticFiles": "1.1.0",
|
||||
"Microsoft.EntityFrameworkCore.SQLite": "1.1.0",
|
||||
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
|
||||
"Microsoft.Extensions.Configuration.Json": "1.1.0",
|
||||
"Microsoft.Extensions.Configuration.CommandLine": "1.1.0",
|
||||
"Microsoft.Extensions.Logging": "1.1.0",
|
||||
"Microsoft.Extensions.Logging.Console": "1.1.0",
|
||||
"Microsoft.Extensions.Logging.Debug": "1.1.0",
|
||||
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0",
|
||||
"AutoMapper": "5.0.2"
|
||||
},
|
||||
|
||||
"tools": {
|
||||
"Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
|
||||
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
|
||||
"Microsoft.DotNet.Watcher.Tools": "1.0.0-preview2-final"
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"imports": []
|
||||
}
|
||||
},
|
||||
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true,
|
||||
"preserveCompilationContext": true,
|
||||
"compile": {
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
},
|
||||
|
||||
"runtimeOptions": {
|
||||
"configProperties": {
|
||||
"System.GC.Server": true
|
||||
}
|
||||
},
|
||||
|
||||
"publishOptions": {
|
||||
"include": [
|
||||
"appsettings.json",
|
||||
"ClientApp/dist",
|
||||
"node_modules",
|
||||
"Views",
|
||||
"web.config",
|
||||
"wwwroot"
|
||||
],
|
||||
"exclude": [
|
||||
"wwwroot/dist/*.map"
|
||||
]
|
||||
},
|
||||
|
||||
"scripts": {
|
||||
"prepublish": [
|
||||
"npm install",
|
||||
"node node_modules/webpack/bin/webpack.js"
|
||||
],
|
||||
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
|
||||
},
|
||||
|
||||
"tooling": {
|
||||
"defaultNamespace": "MusicStore"
|
||||
}
|
||||
}
|
||||
1
samples/react/ReactGrid/.gitignore
vendored
1
samples/react/ReactGrid/.gitignore
vendored
@@ -1,4 +1,3 @@
|
||||
/node_modules/
|
||||
project.lock.json
|
||||
/wwwroot/dist/
|
||||
/Properties/launchSettings.json
|
||||
|
||||
25
samples/react/ReactGrid/ReactGrid.csproj
Normal file
25
samples/react/ReactGrid/ReactGrid.csproj
Normal file
@@ -0,0 +1,25 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<Import Project="..\..\..\build\dependencies.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AspNetCore.ReactServices\Microsoft.AspNetCore.ReactServices.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(AspNetCoreVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
|
||||
<Exec Command="npm install" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>abf90a5b-f4e0-438c-a6e4-9549fb43690b</ProjectGuid>
|
||||
<RootNamespace>ReactGrid</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<DevelopmentServerPort>2311</DevelopmentServerPort>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
||||
@@ -1,37 +0,0 @@
|
||||
{
|
||||
"version": "1.0.0-*",
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true,
|
||||
"preserveCompilationContext": true
|
||||
},
|
||||
"runtimeOptions": {
|
||||
"gcServer": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.1.0",
|
||||
"type": "platform"
|
||||
},
|
||||
"Microsoft.AspNetCore.Diagnostics": "1.1.0",
|
||||
"Microsoft.AspNetCore.ReactServices": "1.1.0-*",
|
||||
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
|
||||
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
|
||||
"Microsoft.AspNetCore.StaticFiles": "1.1.0"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {}
|
||||
},
|
||||
"publishOptions": {
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"**.xproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": [ "npm install" ],
|
||||
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>Helpers for building Angular 2 applications on ASP.NET Core.</Description>
|
||||
<TargetFrameworks>net451;netstandard1.6</TargetFrameworks>
|
||||
<VersionPrefix>1.1.0</VersionPrefix>
|
||||
<VersionSuffix>beta2</VersionSuffix>
|
||||
<PackageTags>aspnetcore;aspnetcoremvc;nodeservices</PackageTags>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.AspNetCore.SpaServices\Microsoft.AspNetCore.SpaServices.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.TagHelpers" Version="$(AspNetCoreVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>421807e6-b62c-417b-b901-46c5dedaa8f1</ProjectGuid>
|
||||
<RootNamespace>Microsoft.AspNetCore.AngularServices</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
||||
@@ -1,12 +0,0 @@
|
||||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: AssemblyMetadata("Serviceable", "True")]
|
||||
[assembly: NeutralResourcesLanguage("en-us")]
|
||||
[assembly: AssemblyCompany("Microsoft Corporation.")]
|
||||
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
|
||||
[assembly: AssemblyProduct("Microsoft ASP.NET Core")]
|
||||
@@ -1,28 +0,0 @@
|
||||
{
|
||||
"description": "Helpers for building Angular 2 applications on ASP.NET Core.",
|
||||
"version": "1.1.0-beta2-*",
|
||||
"packOptions": {
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/aspnet/javascriptservices"
|
||||
},
|
||||
"tags": [
|
||||
"aspnetcore",
|
||||
"aspnetcoremvc",
|
||||
"nodeservices"
|
||||
]
|
||||
},
|
||||
"buildOptions": {
|
||||
"warningsAsErrors": true,
|
||||
"keyFile": "../../tools/Key.snk",
|
||||
"xmlDoc": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.1.0",
|
||||
"Microsoft.AspNetCore.SpaServices": "1.1.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"net451": {},
|
||||
"netstandard1.6": {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>Socket-based RPC for Microsoft.AspNetCore.NodeServices.</Description>
|
||||
<TargetFrameworks>net451;netstandard1.6</TargetFrameworks>
|
||||
<VersionPrefix>1.1.0</VersionPrefix>
|
||||
<VersionSuffix>beta2</VersionSuffix>
|
||||
<PackageTags>aspnetcore;aspnetcoremvc;nodeservices</PackageTags>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Content\**\*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.AspNetCore.NodeServices\Microsoft.AspNetCore.NodeServices.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
|
||||
<PackageReference Include="Microsoft.Tpl.Dataflow" Version="$(MicrosoftDataflowVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
|
||||
<PackageReference Include="System.IO.Pipes" Version="$(CoreFxVersion)" />
|
||||
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="$(ThreadingDataflowVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish" Condition=" '$(IsCrossTargetingBuild)' != 'true' ">
|
||||
<Exec Command="npm install" />
|
||||
<Exec Command="node node_modules/webpack/bin/webpack.js" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
@@ -1,12 +0,0 @@
|
||||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: AssemblyMetadata("Serviceable", "True")]
|
||||
[assembly: NeutralResourcesLanguage("en-us")]
|
||||
[assembly: AssemblyCompany("Microsoft Corporation.")]
|
||||
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
|
||||
[assembly: AssemblyProduct("Microsoft ASP.NET Core")]
|
||||
@@ -62,11 +62,15 @@ namespace Microsoft.AspNetCore.NodeServices.Sockets
|
||||
{
|
||||
if (_connectionHasFailed)
|
||||
{
|
||||
// _connectionHasFailed implies a protocol-level error. The old instance is no longer of any use.
|
||||
var allowConnectionDraining = false;
|
||||
|
||||
// This special exception type forces NodeServicesImpl to restart the Node instance
|
||||
throw new NodeInvocationException(
|
||||
"The SocketNodeInstance socket connection failed. See logs to identify the reason.",
|
||||
null,
|
||||
nodeInstanceUnavailable: true);
|
||||
details: null,
|
||||
nodeInstanceUnavailable: true,
|
||||
allowConnectionDraining: allowConnectionDraining);
|
||||
}
|
||||
|
||||
if (_virtualConnectionClient == null)
|
||||
@@ -175,6 +179,7 @@ namespace Microsoft.AspNetCore.NodeServices.Sockets
|
||||
using (var jsonWriter = new JsonTextWriter(streamWriter))
|
||||
{
|
||||
jsonWriter.CloseOutput = false;
|
||||
jsonWriter.AutoCompleteOnClose = false;
|
||||
|
||||
var serializer = JsonSerializer.Create(jsonSerializerSettings);
|
||||
serializer.Serialize(jsonWriter, serializableObject);
|
||||
|
||||
@@ -70,7 +70,7 @@ const parsedArgs = parseArgs(process.argv);
|
||||
const listenAddress = (useWindowsNamedPipes ? '\\\\.\\pipe\\' : '/tmp/') + parsedArgs.listenAddress;
|
||||
server.listen(listenAddress);
|
||||
|
||||
exitWhenParentExits(parseInt(parsedArgs.parentPid));
|
||||
exitWhenParentExits(parseInt(parsedArgs.parentPid), /* ignoreSigint */ true);
|
||||
|
||||
interface RpcInvocation {
|
||||
moduleName: string;
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
"description": "Socket-based RPC for Microsoft.AspNetCore.NodeServices",
|
||||
"version": "1.1.0-beta2-*",
|
||||
"packOptions": {
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/aspnet/javascriptservices"
|
||||
},
|
||||
"tags": [
|
||||
"aspnetcore",
|
||||
"aspnetcoremvc",
|
||||
"nodeservices"
|
||||
]
|
||||
},
|
||||
"buildOptions": {
|
||||
"warningsAsErrors": true,
|
||||
"keyFile": "../../tools/Key.snk",
|
||||
"embed": [
|
||||
"Content/**/*"
|
||||
],
|
||||
"xmlDoc": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.AspNetCore.NodeServices": "1.1.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"net451": {
|
||||
"dependencies": {
|
||||
"Microsoft.Tpl.Dataflow": "4.5.24"
|
||||
}
|
||||
},
|
||||
"netstandard1.6": {
|
||||
"dependencies": {
|
||||
"System.IO.Pipes": "4.3.0",
|
||||
"System.Threading.Tasks.Dataflow": "4.7.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,13 @@ namespace Microsoft.AspNetCore.NodeServices.HostingModels
|
||||
/// </summary>
|
||||
public bool NodeInstanceUnavailable { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// If true, indicates that even though the invocation failed because the Node.js instance could not be reached
|
||||
/// or needs to be restarted, that Node.js instance may remain alive for a period in order to complete any
|
||||
/// outstanding requests.
|
||||
/// </summary>
|
||||
public bool AllowConnectionDraining { get; private set;}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of <see cref="NodeInvocationException"/>.
|
||||
/// </summary>
|
||||
@@ -29,10 +36,20 @@ namespace Microsoft.AspNetCore.NodeServices.HostingModels
|
||||
/// <param name="message">A description of the exception.</param>
|
||||
/// <param name="details">Additional information, such as a Node.js stack trace, representing the exception.</param>
|
||||
/// <param name="nodeInstanceUnavailable">Specifies a value for the <see cref="NodeInstanceUnavailable"/> flag.</param>
|
||||
public NodeInvocationException(string message, string details, bool nodeInstanceUnavailable)
|
||||
/// <param name="allowConnectionDraining">Specifies a value for the <see cref="AllowConnectionDraining"/> flag.</param>
|
||||
public NodeInvocationException(string message, string details, bool nodeInstanceUnavailable, bool allowConnectionDraining)
|
||||
: this(message, details)
|
||||
{
|
||||
// Reject a meaningless combination of flags
|
||||
if (allowConnectionDraining && !nodeInstanceUnavailable)
|
||||
{
|
||||
throw new ArgumentException(
|
||||
$"The '${ nameof(allowConnectionDraining) }' parameter cannot be true " +
|
||||
$"unless the '${ nameof(nodeInstanceUnavailable) }' parameter is also true.");
|
||||
}
|
||||
|
||||
NodeInstanceUnavailable = nodeInstanceUnavailable;
|
||||
AllowConnectionDraining = allowConnectionDraining;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,21 +27,12 @@ namespace Microsoft.AspNetCore.NodeServices.HostingModels
|
||||
protected readonly ILogger OutputLogger;
|
||||
|
||||
private const string ConnectionEstablishedMessage = "[Microsoft.AspNetCore.NodeServices:Listening]";
|
||||
private const string DebuggingStartedMessageFormat = @"-----
|
||||
*** Node.js debugging is enabled ***
|
||||
{0}
|
||||
|
||||
To debug, run:
|
||||
node-inspector{1}
|
||||
|
||||
If you haven't yet installed node-inspector, you can do so as follows:
|
||||
npm install -g node-inspector
|
||||
-----";
|
||||
private readonly TaskCompletionSource<object> _connectionIsReadySource = new TaskCompletionSource<object>();
|
||||
private bool _disposed;
|
||||
private readonly StringAsTempFile _entryPointScript;
|
||||
private FileSystemWatcher _fileSystemWatcher;
|
||||
private int _invocationTimeoutMilliseconds;
|
||||
private bool _launchWithDebugging;
|
||||
private readonly Process _nodeProcess;
|
||||
private int? _nodeDebuggingPort;
|
||||
private bool _nodeProcessNeedsRestart;
|
||||
@@ -78,9 +69,10 @@ If you haven't yet installed node-inspector, you can do so as follows:
|
||||
OutputLogger = nodeOutputLogger;
|
||||
_entryPointScript = new StringAsTempFile(entryPointScript);
|
||||
_invocationTimeoutMilliseconds = invocationTimeoutMilliseconds;
|
||||
_launchWithDebugging = launchWithDebugging;
|
||||
|
||||
var startInfo = PrepareNodeProcessStartInfo(_entryPointScript.FileName, projectPath, commandLineArguments,
|
||||
environmentVars, launchWithDebugging, debuggingPort);
|
||||
environmentVars, _launchWithDebugging, debuggingPort);
|
||||
_nodeProcess = LaunchNodeProcess(startInfo);
|
||||
_watchFileExtensions = watchFileExtensions;
|
||||
_fileSystemWatcher = BeginFileWatcher(projectPath);
|
||||
@@ -103,10 +95,17 @@ If you haven't yet installed node-inspector, you can do so as follows:
|
||||
{
|
||||
// This special kind of exception triggers a transparent retry - NodeServicesImpl will launch
|
||||
// a new Node instance and pass the invocation to that one instead.
|
||||
// Note that if the Node process is listening for debugger connections, then we need it to shut
|
||||
// down immediately and not stay open for connection draining (because if it did, the new Node
|
||||
// instance wouldn't able to start, because the old one would still hold the debugging port).
|
||||
var message = _nodeProcess.HasExited
|
||||
? "The Node process has exited"
|
||||
: "The Node process needs to restart";
|
||||
throw new NodeInvocationException(message, null, nodeInstanceUnavailable: true);
|
||||
throw new NodeInvocationException(
|
||||
message,
|
||||
details: null,
|
||||
nodeInstanceUnavailable: true,
|
||||
allowConnectionDraining: !_launchWithDebugging);
|
||||
}
|
||||
|
||||
// Construct a new cancellation token that combines the supplied token with the configured invocation
|
||||
@@ -206,8 +205,8 @@ If you haven't yet installed node-inspector, you can do so as follows:
|
||||
/// <param name="projectPath">The root path of the project. This is used when locating Node.js modules relative to the project root.</param>
|
||||
/// <param name="commandLineArguments">Command-line arguments to be passed to the Node.js process.</param>
|
||||
/// <param name="environmentVars">Environment variables to be set on the Node.js process.</param>
|
||||
/// <param name="launchWithDebugging">If true, passes a flag to the Node.js process telling it to accept V8 debugger connections.</param>
|
||||
/// <param name="debuggingPort">If debugging is enabled, the Node.js process should listen for V8 debugger connections on this port.</param>
|
||||
/// <param name="launchWithDebugging">If true, passes a flag to the Node.js process telling it to accept V8 Inspector connections.</param>
|
||||
/// <param name="debuggingPort">If debugging is enabled, the Node.js process should listen for V8 Inspector connections on this port.</param>
|
||||
/// <returns></returns>
|
||||
protected virtual ProcessStartInfo PrepareNodeProcessStartInfo(
|
||||
string entryPointFilename, string projectPath, string commandLineArguments,
|
||||
@@ -217,7 +216,7 @@ If you haven't yet installed node-inspector, you can do so as follows:
|
||||
string debuggingArgs;
|
||||
if (launchWithDebugging)
|
||||
{
|
||||
debuggingArgs = debuggingPort != default(int) ? $"--debug={debuggingPort} " : "--debug ";
|
||||
debuggingArgs = debuggingPort != default(int) ? $"--inspect={debuggingPort} " : "--inspect ";
|
||||
_nodeDebuggingPort = debuggingPort;
|
||||
}
|
||||
else
|
||||
@@ -380,10 +379,9 @@ If you haven't yet installed node-inspector, you can do so as follows:
|
||||
{
|
||||
if (evt.Data != null)
|
||||
{
|
||||
if (IsDebuggerListeningMessage(evt.Data))
|
||||
if (_launchWithDebugging && IsDebuggerMessage(evt.Data))
|
||||
{
|
||||
var debugPortArg = _nodeDebuggingPort.HasValue ? $" --debug-port={_nodeDebuggingPort.Value}" : string.Empty;
|
||||
OutputLogger.LogWarning(string.Format(DebuggingStartedMessageFormat, evt.Data, debugPortArg));
|
||||
OutputLogger.LogWarning(evt.Data);
|
||||
}
|
||||
else if (!initializationIsCompleted)
|
||||
{
|
||||
@@ -402,9 +400,12 @@ If you haven't yet installed node-inspector, you can do so as follows:
|
||||
_nodeProcess.BeginErrorReadLine();
|
||||
}
|
||||
|
||||
private static bool IsDebuggerListeningMessage(string message)
|
||||
private static bool IsDebuggerMessage(string message)
|
||||
{
|
||||
return message.StartsWith("Debugger listening ", StringComparison.OrdinalIgnoreCase);
|
||||
return message.StartsWith("Debugger attached", StringComparison.OrdinalIgnoreCase) ||
|
||||
message.StartsWith("Debugger listening ", StringComparison.OrdinalIgnoreCase) ||
|
||||
message.StartsWith("To start debugging", StringComparison.OrdinalIgnoreCase) ||
|
||||
message.Contains("chrome-devtools:");
|
||||
}
|
||||
|
||||
private FileSystemWatcher BeginFileWatcher(string rootDir)
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>Invoke Node.js modules at runtime in ASP.NET Core applications.</Description>
|
||||
<TargetFrameworks>net451;netstandard1.6</TargetFrameworks>
|
||||
<VersionPrefix>1.1.1</VersionPrefix>
|
||||
<VersionSuffix>alpha</VersionSuffix>
|
||||
<PackageTags>aspnetcore;aspnetcoremvc;nodeservices</PackageTags>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Content\**\*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="$(AspNetCoreVersion)" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="$(JsonNetVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
|
||||
<PackageReference Include="System.Diagnostics.Process" Version="$(CoreFxVersion)" />
|
||||
<PackageReference Include="System.IO.FileSystem.Watcher" Version="$(CoreFxVersion)" />
|
||||
<PackageReference Include="System.Runtime.Loader" Version="$(CoreFxVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish" Condition=" '$(IsCrossTargetingBuild)' != 'true' ">
|
||||
<Exec Command="npm install" />
|
||||
<Exec Command="node node_modules/webpack/bin/webpack.js" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>b0fa4175-8b29-4904-9780-28b3c24b0567</ProjectGuid>
|
||||
<RootNamespace>Microsoft.AspNetCore.NodeServices</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\JavaScriptServices.sln\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
||||
@@ -72,7 +72,8 @@ namespace Microsoft.AspNetCore.NodeServices
|
||||
{
|
||||
if (_currentNodeInstance == nodeInstance)
|
||||
{
|
||||
DisposeNodeInstance(_currentNodeInstance, delay: ConnectionDrainingTimespan);
|
||||
var disposalDelay = ex.AllowConnectionDraining ? ConnectionDrainingTimespan : TimeSpan.Zero;
|
||||
DisposeNodeInstance(_currentNodeInstance, disposalDelay);
|
||||
_currentNodeInstance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: AssemblyMetadata("Serviceable", "True")]
|
||||
[assembly: NeutralResourcesLanguage("en-us")]
|
||||
[assembly: AssemblyCompany("Microsoft Corporation.")]
|
||||
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
|
||||
[assembly: AssemblyProduct("Microsoft ASP.NET Core")]
|
||||
@@ -1,45 +0,0 @@
|
||||
{
|
||||
"description": "Invoke Node.js modules at runtime in ASP.NET Core applications.",
|
||||
"version": "1.1.0-rc1-*",
|
||||
"packOptions": {
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/aspnet/javascriptservices"
|
||||
},
|
||||
"tags": [
|
||||
"aspnetcore",
|
||||
"aspnetcoremvc",
|
||||
"nodeservices"
|
||||
]
|
||||
},
|
||||
"buildOptions": {
|
||||
"warningsAsErrors": true,
|
||||
"keyFile": "../../tools/Key.snk",
|
||||
"embed": [
|
||||
"Content/**/*"
|
||||
],
|
||||
"xmlDoc": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.AspNetCore.Hosting.Abstractions": "1.1.0",
|
||||
"Microsoft.Extensions.Logging.Console": "1.1.0",
|
||||
"Newtonsoft.Json": "9.0.1",
|
||||
"NETStandard.Library": "1.6.1-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"net451": {},
|
||||
"netstandard1.6": {
|
||||
"dependencies": {
|
||||
"System.Diagnostics.Process": "4.3.0",
|
||||
"System.IO.FileSystem.Watcher": "4.3.0",
|
||||
"System.Runtime.Loader": "4.3.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": [
|
||||
"npm install",
|
||||
"node node_modules/webpack/bin/webpack.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>Helpers for building React applications on ASP.NET Core.</Description>
|
||||
<TargetFrameworks>net451;netstandard1.6</TargetFrameworks>
|
||||
<VersionPrefix>1.1.0</VersionPrefix>
|
||||
<VersionSuffix>beta2</VersionSuffix>
|
||||
<PackageTags>aspnetcore;aspnetcoremvc;nodeservices</PackageTags>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.AspNetCore.SpaServices\Microsoft.AspNetCore.SpaServices.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.TagHelpers" Version="$(AspNetCoreVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>b04381de-991f-4831-a0b5-fe1bd3ef80c4</ProjectGuid>
|
||||
<RootNamespace>Microsoft.AspNetCore.ReactServices</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
||||
@@ -1,12 +0,0 @@
|
||||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: AssemblyMetadata("Serviceable", "True")]
|
||||
[assembly: NeutralResourcesLanguage("en-us")]
|
||||
[assembly: AssemblyCompany("Microsoft Corporation.")]
|
||||
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
|
||||
[assembly: AssemblyProduct("Microsoft ASP.NET Core")]
|
||||
@@ -1,28 +0,0 @@
|
||||
{
|
||||
"description": "Helpers for building React applications on ASP.NET Core.",
|
||||
"version": "1.1.0-beta2-*",
|
||||
"packOptions": {
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/aspnet/javascriptservices"
|
||||
},
|
||||
"tags": [
|
||||
"aspnetcore",
|
||||
"aspnetcoremvc",
|
||||
"nodeservices"
|
||||
]
|
||||
},
|
||||
"buildOptions": {
|
||||
"warningsAsErrors": true,
|
||||
"keyFile": "../../tools/Key.snk",
|
||||
"xmlDoc": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.1.0",
|
||||
"Microsoft.AspNetCore.SpaServices": "1.1.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"net451": {},
|
||||
"netstandard1.6": {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<Import Project="..\..\build\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>Helpers for building single-page applications on ASP.NET MVC Core.</Description>
|
||||
<TargetFrameworks>net451;netstandard1.6</TargetFrameworks>
|
||||
<VersionPrefix>1.1.1</VersionPrefix>
|
||||
<VersionSuffix>alpha</VersionSuffix>
|
||||
<PackageTags>aspnetcore;aspnetcoremvc;nodeservices</PackageTags>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Content\**\*" />
|
||||
<ProjectReference Include="..\Microsoft.AspNetCore.NodeServices\Microsoft.AspNetCore.NodeServices.csproj" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(AspNetCoreVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish" Condition=" '$(IsCrossTargetingBuild)' != 'true' ">
|
||||
<Exec Command="npm install" />
|
||||
<Exec Command="node node_modules/webpack/bin/webpack.js" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0.23107" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.23107</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>4624f728-6dff-44b6-93b5-3c7d9c94bf3f</ProjectGuid>
|
||||
<RootNamespace>Microsoft.AspNetCore.SpaServices</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
||||
@@ -129,6 +129,11 @@ namespace Microsoft.AspNetCore.SpaServices.Prerendering
|
||||
return;
|
||||
}
|
||||
|
||||
if (result.StatusCode.HasValue)
|
||||
{
|
||||
ViewContext.HttpContext.Response.StatusCode = result.StatusCode.Value;
|
||||
}
|
||||
|
||||
// It's some HTML to inject
|
||||
output.Content.SetHtmlContent(result.Html);
|
||||
|
||||
|
||||
@@ -25,5 +25,10 @@ namespace Microsoft.AspNetCore.SpaServices.Prerendering
|
||||
/// to the SPA's routing configuration.
|
||||
/// </summary>
|
||||
public string RedirectUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If set, specifies the HTTP status code that should be sent back with the server response.
|
||||
/// </summary>
|
||||
public int? StatusCode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: AssemblyMetadata("Serviceable", "True")]
|
||||
[assembly: NeutralResourcesLanguage("en-us")]
|
||||
[assembly: AssemblyCompany("Microsoft Corporation.")]
|
||||
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
|
||||
[assembly: AssemblyProduct("Microsoft ASP.NET Core")]
|
||||
@@ -633,6 +633,23 @@ Webpack has built-in HMR support for various types of module, such as styles and
|
||||
|
||||
This is [documented in detail on the Webpack site](https://webpack.github.io/docs/hot-module-replacement.html). Or to get a working HMR-enabled ASP.NET Core site with Angular 2, React, React+Redux, or Knockout, you can use the [aspnetcore-spa generator](http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/).
|
||||
|
||||
#### Passing options to the Webpack Hot Middleware client
|
||||
|
||||
You can configure the [Webpack Hot Middleware client](https://github.com/glenjamin/webpack-hot-middleware#client)
|
||||
by using the `HotModuleReplacementClientOptions` property on `WebpackDevMiddlewareOptions`:
|
||||
|
||||
```csharp
|
||||
app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions {
|
||||
HotModuleReplacement = true,
|
||||
HotModuleReplacementClientOptions = new Dictionary<string, string> {
|
||||
{ "reload", "true" },
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
For the list of available options, please see [Webpack Hot Middleware docs](https://github.com/glenjamin/webpack-hot-middleware#client).
|
||||
|
||||
**Note**: The `path` option cannot be overridden this way - it is controlled by the `HotModuleReplacementEndpoint` setting.
|
||||
|
||||
## Routing helper: MapSpaFallbackRoute
|
||||
|
||||
@@ -771,14 +788,14 @@ Caveats:
|
||||
|
||||
## Debugging your JavaScript/TypeScript code when it runs on the server
|
||||
|
||||
When you're using NodeServices or the server-side prerendering feature included in the project templates in this repo, your JavaScript/TypeScript code will execute on the server in a background instance of Node.js. You can enable debugging on that Node.js instance. Here's how to do it.
|
||||
When you're using NodeServices or the server-side prerendering feature included in the project templates in this repo, your JavaScript/TypeScript code will execute on the server in a background instance of Node.js. You can enable debugging via [V8 Inspector Integration](https://nodejs.org/api/debugger.html#debugger_v8_inspector_integration_for_node_js) on that Node.js instance. Here's how to do it.
|
||||
|
||||
First, in your `Startup.cs` file, in the `ConfigureServices` method, add the following:
|
||||
|
||||
```
|
||||
services.AddNodeServices(options => {
|
||||
options.LaunchWithDebugging = true;
|
||||
options.DebuggingPort = 5858;
|
||||
options.DebuggingPort = 9229;
|
||||
});
|
||||
```
|
||||
|
||||
@@ -786,21 +803,20 @@ Now, run your application from that command line (e.g., `dotnet run`). Then in a
|
||||
|
||||
In the console, you should see all the normal trace messages appear, plus among them will be:
|
||||
|
||||
-----
|
||||
*** Node.js debugging is enabled ***
|
||||
Debugger listening on port 5858
|
||||
```
|
||||
warn: Microsoft.AspNetCore.NodeServices[0]
|
||||
Debugger listening on port 9229.
|
||||
warn: Microsoft.AspNetCore.NodeServices[0]
|
||||
Warning: This is an experimental feature and could change at any time.
|
||||
warn: Microsoft.AspNetCore.NodeServices[0]
|
||||
To start debugging, open the following URL in Chrome:
|
||||
warn: Microsoft.AspNetCore.NodeServices[0]
|
||||
chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
||||
```
|
||||
|
||||
To debug, run:
|
||||
node-inspector
|
||||
As per instructions open the URL in Chrome. Alternatively you can go to the `Sources` tab of the Dev Tools (at http://localhost:5000) and connect to the Node instance under `Threads` in the right sidebar.
|
||||
|
||||
If you haven't yet installed node-inspector, you can do so as follows:
|
||||
npm install -g node-inspector
|
||||
-----
|
||||
By expanding the `webpack://` entry in the sidebar, you'll be able to find your original source code (it's using source maps), and then set breakpoints in it. When you re-run your app in another browser window, your breakpoints will be hit, then you can debug the server-side execution just like you'd debug client-side execution. It looks like this:
|
||||
|
||||
In some other command line window, follow those instructions (i.e., install `node-inspector` as it describes, then run `node-inspector`). Then you can open a browser at `http://127.0.0.1:8080/?port=5858` and you'll see the debugger UI.
|
||||

|
||||
|
||||
By expanding the `webpack://` entry in the sidebar, you'll be able to find your original TypeScript code (it's using source maps), and then set breakpoints in it. When you re-run your app in another browser window, your breakpoints will be hit, then you can debug the server-side execution just like you'd debug client-side execution. It looks like this:
|
||||
|
||||

|
||||
|
||||
(Note: although this looks like Chrome's native debugger for client-side code, it is actually a JavaScript-powered debugger UI that's connected to the server-side runtime)
|
||||
|
||||
@@ -78,7 +78,9 @@ namespace Microsoft.AspNetCore.Builder
|
||||
// Ideally, this would be relative to the application's PathBase (so it could work in virtual directories)
|
||||
// but it's not clear that such information exists during application startup, as opposed to within the context
|
||||
// of a request.
|
||||
var hmrEndpoint = "/__webpack_hmr";
|
||||
var hmrEndpoint = !string.IsNullOrEmpty(options.HotModuleReplacementEndpoint)
|
||||
? options.HotModuleReplacementEndpoint
|
||||
: "/__webpack_hmr"; // Matches webpack's built-in default
|
||||
|
||||
// Tell Node to start the server hosting webpack-dev-middleware
|
||||
var devServerOptions = new
|
||||
|
||||
@@ -13,6 +13,12 @@ namespace Microsoft.AspNetCore.SpaServices.Webpack
|
||||
/// </summary>
|
||||
public bool HotModuleReplacement { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If set, overrides the URL that Webpack's client-side code will connect to when listening for updates.
|
||||
/// This must be a root-relative URL similar to "/__webpack_hmr" (which is the default endpoint).
|
||||
/// </summary>
|
||||
public string HotModuleReplacementEndpoint { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the internal port number that client-side HMR code will connect to.
|
||||
/// </summary>
|
||||
@@ -24,6 +30,11 @@ namespace Microsoft.AspNetCore.SpaServices.Webpack
|
||||
/// </summary>
|
||||
public bool ReactHotModuleReplacement { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies additional options to be passed to the Webpack Hot Middleware client, if used.
|
||||
/// </summary>
|
||||
public IDictionary<string, string> HotModuleReplacementClientOptions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the Webpack configuration file to be used. If not set, defaults to 'webpack.config.js'.
|
||||
/// </summary>
|
||||
|
||||
@@ -4,3 +4,5 @@
|
||||
|
||||
/**/.d.ts
|
||||
!/src/**/*.d.ts
|
||||
|
||||
yarn.lock
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
!/*.js
|
||||
!/*.d.ts
|
||||
/typings/
|
||||
yarn.lock
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "aspnet-prerendering",
|
||||
"version": "2.0.2",
|
||||
"version": "2.0.3",
|
||||
"description": "Helpers for server-side rendering of JavaScript applications in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -21,8 +21,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^6.0.42",
|
||||
"@types/whatwg-fetch": "0.0.31",
|
||||
"rimraf": "^2.5.4",
|
||||
"typescript": "^2.0.0"
|
||||
"typescript": "^2.2.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,9 @@ export function createServerRenderer(bootFunc: BootFunc): RenderToStringFunc {
|
||||
});
|
||||
const parsedAbsoluteRequestUrl = url.parse(absoluteRequestUrl);
|
||||
const params: BootFuncParams = {
|
||||
location: url.parse(requestPathAndQuery),
|
||||
// It's helpful for boot funcs to receive the query as a key-value object, so parse it here
|
||||
// e.g., react-redux-router requires location.query to be a key-value object for consistency with client-side behaviour
|
||||
location: url.parse(requestPathAndQuery, /* parseQueryString */ true),
|
||||
origin: parsedAbsoluteRequestUrl.protocol + '//' + parsedAbsoluteRequestUrl.host,
|
||||
url: requestPathAndQuery,
|
||||
baseUrl: (requestPathBase || '') + '/',
|
||||
|
||||
@@ -8,6 +8,7 @@ interface RenderToStringCallback {
|
||||
|
||||
interface RenderToStringResult {
|
||||
html: string;
|
||||
statusCode: number;
|
||||
globals?: { [key: string]: any };
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "aspnet-webpack-react",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.5",
|
||||
"description": "Helpers for using Webpack with React in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -26,12 +26,12 @@
|
||||
"react-transform-hmr": "^1.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/webpack": "^1.12.34",
|
||||
"@types/webpack": "^2.2.0",
|
||||
"rimraf": "^2.5.4",
|
||||
"typescript": "^2.0.0",
|
||||
"webpack": "^1.12.14"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"webpack": "^1.12.14"
|
||||
"webpack": "^1.13.2 || ^2.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,58 @@
|
||||
import * as webpack from 'webpack';
|
||||
type OldOrNewModule = webpack.OldModule & webpack.NewModule;
|
||||
|
||||
export function addReactHotModuleReplacementBabelTransform(webpackConfig: webpack.Configuration) {
|
||||
const moduleRules: webpack.Loader[] =
|
||||
(webpackConfig.module as any).rules // Webpack < 2.1.0 beta 23
|
||||
|| webpackConfig.module.loaders; // Webpack >= 2.1.0 beta 23
|
||||
const moduleConfig = webpackConfig.module as OldOrNewModule;
|
||||
const moduleRules = moduleConfig.rules // Webpack >= 2.1.0 beta 23
|
||||
|| moduleConfig.loaders; // Legacy/back-compat
|
||||
if (!moduleRules) {
|
||||
return; // Unknown rules list format
|
||||
}
|
||||
|
||||
moduleRules.forEach(loaderConfig => {
|
||||
if (loaderConfig.loader && loaderConfig.loader.match(/\bbabel-loader\b/)) {
|
||||
// Ensure the babel-loader options includes a 'query'
|
||||
const query = loaderConfig.query = loaderConfig.query || {};
|
||||
moduleRules.forEach(rule => {
|
||||
// Allow rules/loaders entries to be either { loader: ... } or { use: ... }
|
||||
// Ignore other config formats (too many combinations to support them all)
|
||||
let loaderConfig =
|
||||
(rule as webpack.NewUseRule).use // Recommended config format for Webpack 2.x
|
||||
|| (rule as webpack.LoaderRule).loader; // Typical config format for Webpack 1.x
|
||||
if (!loaderConfig) {
|
||||
return; // Not a supported rule format (e.g., an array)
|
||||
}
|
||||
|
||||
// Allow use/loader values to be either { loader: 'name' } or 'name'
|
||||
// We don't need to support other possible ways of specifying loaders (e.g., arrays),
|
||||
// so skip unrecognized formats.
|
||||
const loaderNameString =
|
||||
(loaderConfig as (webpack.OldLoader | webpack.NewLoader)).loader
|
||||
|| (loaderConfig as string);
|
||||
if (!loaderNameString || (typeof loaderNameString !== 'string')) {
|
||||
return; // Not a supported loader format (e.g., an array)
|
||||
}
|
||||
|
||||
// Find the babel-loader entry
|
||||
if (loaderNameString.match(/\bbabel-loader\b/)) {
|
||||
// If the rule is of the form { use: 'name' }, then replace it
|
||||
// with { use: { loader: 'name' }} so we can attach options
|
||||
if ((rule as webpack.NewUseRule).use && typeof loaderConfig === 'string') {
|
||||
loaderConfig = (rule as webpack.NewUseRule).use = { loader: loaderConfig };
|
||||
}
|
||||
|
||||
const configItemWithOptions = typeof loaderConfig === 'string'
|
||||
? rule // The rule is of the form { loader: 'name' }, so put options on the rule
|
||||
: loaderConfig; // The rule is of the form { use/loader: { loader: 'name' }}, so put options on the use/loader
|
||||
|
||||
// Ensure the config has an 'options' (or a legacy 'query')
|
||||
let optionsObject =
|
||||
(configItemWithOptions as webpack.NewLoader).options // Recommended config format for Webpack 2.x
|
||||
|| (configItemWithOptions as webpack.OldLoaderRule).query; // Legacy
|
||||
if (!optionsObject) {
|
||||
// If neither options nor query was set, define a new value,
|
||||
// using the legacy format ('query') for compatibility with Webpack 1.x
|
||||
optionsObject = (configItemWithOptions as webpack.OldLoaderRule).query = {};
|
||||
}
|
||||
|
||||
// Ensure Babel plugins includes 'react-transform'
|
||||
const plugins = query['plugins'] = query['plugins'] || [];
|
||||
const plugins = optionsObject['plugins'] = optionsObject['plugins'] || [];
|
||||
const hasReactTransform = plugins.some(p => p && p[0] === 'react-transform');
|
||||
if (!hasReactTransform) {
|
||||
plugins.push(['react-transform', {}]);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "aspnet-webpack",
|
||||
"version": "1.0.26",
|
||||
"version": "1.0.28",
|
||||
"description": "Helpers for using Webpack in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -27,7 +27,7 @@
|
||||
"devDependencies": {
|
||||
"@types/connect": "^3.4.30",
|
||||
"@types/node": "^6.0.42",
|
||||
"@types/webpack": "^1.12.34",
|
||||
"@types/webpack": "^2.2.0",
|
||||
"rimraf": "^2.5.4",
|
||||
"typescript": "^2.0.0",
|
||||
"webpack": "^1.13.2"
|
||||
|
||||
@@ -3,6 +3,7 @@ import * as webpack from 'webpack';
|
||||
import * as url from 'url';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as querystring from 'querystring';
|
||||
import { requireNewCopy } from './RequireNewCopy';
|
||||
|
||||
export type CreateDevServerResult = {
|
||||
@@ -26,10 +27,19 @@ interface CreateDevServerOptions {
|
||||
interface DevServerOptions {
|
||||
HotModuleReplacement: boolean;
|
||||
HotModuleReplacementServerPort: number;
|
||||
HotModuleReplacementClientOptions: Object;
|
||||
ReactHotModuleReplacement: boolean;
|
||||
}
|
||||
|
||||
function attachWebpackDevMiddleware(app: any, webpackConfig: webpack.Configuration, enableHotModuleReplacement: boolean, enableReactHotModuleReplacement: boolean, hmrClientEndpoint: string, hmrServerEndpoint: string) {
|
||||
// We support these three kinds of webpack.config.js export. We don't currently support exported promises
|
||||
// (though we might be able to add that in the future, if there's a need).
|
||||
type WebpackConfigOrArray = webpack.Configuration | webpack.Configuration[];
|
||||
interface WebpackConfigFunc {
|
||||
(env?: any): WebpackConfigOrArray;
|
||||
}
|
||||
type WebpackConfigFileExport = WebpackConfigOrArray | WebpackConfigFunc;
|
||||
|
||||
function attachWebpackDevMiddleware(app: any, webpackConfig: webpack.Configuration, enableHotModuleReplacement: boolean, enableReactHotModuleReplacement: boolean, hmrClientOptions: HotModuleReplacementClientOptions, hmrClientEndpoint: string, hmrServerEndpoint: string) {
|
||||
// Build the final Webpack config based on supplied options
|
||||
if (enableHotModuleReplacement) {
|
||||
// For this, we only support the key/value config format, not string or string[], since
|
||||
@@ -45,7 +55,8 @@ function attachWebpackDevMiddleware(app: any, webpackConfig: webpack.Configurati
|
||||
// Augment all entry points so they support HMR (unless they already do)
|
||||
Object.getOwnPropertyNames(entryPoints).forEach(entryPointName => {
|
||||
const webpackHotMiddlewareEntryPoint = 'webpack-hot-middleware/client';
|
||||
const webpackHotMiddlewareOptions = `?path=` + encodeURIComponent(hmrClientEndpoint);
|
||||
hmrClientOptions.path = hmrClientEndpoint;
|
||||
const webpackHotMiddlewareOptions = '?' + querystring.stringify(hmrClientOptions);
|
||||
if (typeof entryPoints[entryPointName] === 'string') {
|
||||
entryPoints[entryPointName] = [webpackHotMiddlewareEntryPoint + webpackHotMiddlewareOptions, entryPoints[entryPointName]];
|
||||
} else if (firstIndexOfStringStartingWith(entryPoints[entryPointName], webpackHotMiddlewareEntryPoint) < 0) {
|
||||
@@ -118,12 +129,51 @@ function attachWebpackDevMiddleware(app: any, webpackConfig: webpack.Configurati
|
||||
} catch (ex) {
|
||||
throw new Error('HotModuleReplacement failed because of an error while loading \'webpack-hot-middleware\'. Error was: ' + ex.stack);
|
||||
}
|
||||
app.use(workaroundIISExpressEventStreamFlushingIssue(hmrServerEndpoint));
|
||||
app.use(webpackHotMiddlewareModule(compiler, {
|
||||
path: hmrServerEndpoint
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
function workaroundIISExpressEventStreamFlushingIssue(path: string): connect.NextHandleFunction {
|
||||
// IIS Express makes HMR seem very slow, because when it's reverse-proxying an EventStream response
|
||||
// from Kestrel, it doesn't pass through the lines to the browser immediately, even if you're calling
|
||||
// response.Flush (or equivalent) in your ASP.NET Core code. For some reason, it waits until the following
|
||||
// line is sent. By default, that wouldn't be until the next HMR heartbeat, which can be up to 5 seconds later.
|
||||
// In effect, it looks as if your code is taking 5 seconds longer to compile than it really does.
|
||||
//
|
||||
// As a workaround, this connect middleware intercepts requests to the HMR endpoint, and modifies the response
|
||||
// stream so that all EventStream 'data' lines are immediately followed with a further blank line. This is
|
||||
// harmless in non-IIS-Express cases, because it's OK to have extra blank lines in an EventStream response.
|
||||
// The implementation is simplistic - rather than using a true stream reader, we just patch the 'write'
|
||||
// method. This relies on webpack's HMR code always writing complete EventStream messages with a single
|
||||
// 'write' call. That works fine today, but if webpack's HMR code was changed, this workaround might have
|
||||
// to be updated.
|
||||
const eventStreamLineStart = /^data\:/;
|
||||
return (req, res, next) => {
|
||||
// We only want to interfere with requests to the HMR endpoint, so check this request matches
|
||||
const urlMatchesPath = (req.url === path) || (req.url.split('?', 1)[0] === path);
|
||||
if (urlMatchesPath) {
|
||||
const origWrite = res.write;
|
||||
res.write = function (chunk) {
|
||||
const result = origWrite.apply(this, arguments);
|
||||
|
||||
// We only want to interfere with actual EventStream data lines, so check it is one
|
||||
if (typeof (chunk) === 'string') {
|
||||
if (eventStreamLineStart.test(chunk) && chunk.charAt(chunk.length - 1) === '\n') {
|
||||
origWrite.call(this, '\n\n');
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
return next();
|
||||
};
|
||||
}
|
||||
|
||||
function copyRecursiveToRealFsSync(from: typeof fs, rootDir: string, exclude: RegExp[]) {
|
||||
from.readdirSync(rootDir).forEach(filename => {
|
||||
const fullPath = pathJoinSafe(rootDir, filename);
|
||||
@@ -165,13 +215,20 @@ export function createWebpackDevServer(callback: CreateDevServerCallback, option
|
||||
const options: CreateDevServerOptions = JSON.parse(optionsJson);
|
||||
|
||||
// Read the webpack config's export, and normalize it into the more general 'array of configs' format
|
||||
let webpackConfigArray: webpack.Configuration[] = requireNewCopy(options.webpackConfigPath);
|
||||
if (!(webpackConfigArray instanceof Array)) {
|
||||
webpackConfigArray = [webpackConfigArray as webpack.Configuration];
|
||||
let webpackConfigExport: WebpackConfigFileExport = requireNewCopy(options.webpackConfigPath);
|
||||
if (webpackConfigExport instanceof Function) {
|
||||
// If you export a function, we'll call it with an undefined 'env' arg, since we have nothing else
|
||||
// to pass. This is the same as what the webpack CLI tool does if you specify no '--env.x' values.
|
||||
// In the future, we could add support for configuring the 'env' param in Startup.cs. But right
|
||||
// now, it's not clear that people will want to do that (and they can always make up their own
|
||||
// default env values in their webpack.config.js).
|
||||
webpackConfigExport = webpackConfigExport();
|
||||
}
|
||||
const webpackConfigArray = webpackConfigExport instanceof Array ? webpackConfigExport : [webpackConfigExport];
|
||||
|
||||
const enableHotModuleReplacement = options.suppliedOptions.HotModuleReplacement;
|
||||
const enableReactHotModuleReplacement = options.suppliedOptions.ReactHotModuleReplacement;
|
||||
const hmrClientOptions = options.suppliedOptions.HotModuleReplacementClientOptions || {};
|
||||
if (enableReactHotModuleReplacement && !enableHotModuleReplacement) {
|
||||
callback('To use ReactHotModuleReplacement, you must also enable the HotModuleReplacement option.', null);
|
||||
return;
|
||||
@@ -210,7 +267,7 @@ export function createWebpackDevServer(callback: CreateDevServerCallback, option
|
||||
|| `http://localhost:${listener.address().port}/__webpack_hmr`; // Fall back on absolute URL to bypass proxying
|
||||
const hmrServerEndpoint = options.hotModuleReplacementEndpointUrl
|
||||
|| '/__webpack_hmr'; // URL is relative to webpack dev server root
|
||||
attachWebpackDevMiddleware(app, webpackConfig, enableHotModuleReplacement, enableReactHotModuleReplacement, hmrClientEndpoint, hmrServerEndpoint);
|
||||
attachWebpackDevMiddleware(app, webpackConfig, enableHotModuleReplacement, enableReactHotModuleReplacement, hmrClientOptions, hmrClientEndpoint, hmrServerEndpoint);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
"target": "es5",
|
||||
"declaration": true,
|
||||
"outDir": ".",
|
||||
"lib": ["es2015"]
|
||||
"lib": ["es2015"],
|
||||
"types": ["node"]
|
||||
},
|
||||
"files": [
|
||||
"src/index.ts"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "domain-task",
|
||||
"version": "2.0.2",
|
||||
"version": "3.0.0",
|
||||
"description": "Tracks outstanding operations for a logical thread of execution",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -22,8 +22,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^6.0.42",
|
||||
"@types/whatwg-fetch": "0.0.31",
|
||||
"rimraf": "^2.5.4",
|
||||
"typescript": "^2.0.0"
|
||||
"typescript": "^2.2.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ function issueRequest(baseUrl: string, req: string | Request, init?: RequestInit
|
||||
if (baseUrl) {
|
||||
if (req instanceof Request) {
|
||||
const reqAsRequest = req as Request;
|
||||
reqAsRequest.url = url.resolve(baseUrl, reqAsRequest.url);
|
||||
(reqAsRequest as any).url = url.resolve(baseUrl, reqAsRequest.url);
|
||||
} else {
|
||||
req = url.resolve(baseUrl, req as string);
|
||||
}
|
||||
@@ -25,15 +25,6 @@ function issueRequest(baseUrl: string, req: string | Request, init?: RequestInit
|
||||
`);
|
||||
}
|
||||
|
||||
// Currently, some part of ASP.NET (perhaps just Kestrel on Mac - unconfirmed) doesn't complete
|
||||
// its responses if we send 'Connection: close', which is the default. So if no 'Connection' header
|
||||
// has been specified explicitly, use 'Connection: keep-alive'.
|
||||
init = init || {};
|
||||
init.headers = init.headers || {};
|
||||
if (!init.headers['Connection']) {
|
||||
init.headers['Connection'] = 'keep-alive';
|
||||
}
|
||||
|
||||
return isomorphicFetch(req, init);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
{
|
||||
"description": "Helpers for building single-page applications on ASP.NET MVC Core",
|
||||
"version": "1.1.0-rc1-*",
|
||||
"packOptions": {
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/aspnet/javascriptservices"
|
||||
},
|
||||
"tags": [
|
||||
"aspnetcore",
|
||||
"aspnetcoremvc",
|
||||
"nodeservices"
|
||||
]
|
||||
},
|
||||
"buildOptions": {
|
||||
"warningsAsErrors": true,
|
||||
"keyFile": "../../tools/Key.snk",
|
||||
"embed": [
|
||||
"Content/**/*"
|
||||
],
|
||||
"xmlDoc": true
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.AspNetCore.Mvc": "1.1.0",
|
||||
"Microsoft.AspNetCore.NodeServices": "1.1.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"net451": {},
|
||||
"netstandard1.6": {}
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": [
|
||||
"npm install",
|
||||
"node node_modules/webpack/bin/webpack.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
[config]
|
||||
SCM_SCRIPT_GENERATOR_ARGS=--aspNetCore project.json
|
||||
@@ -1,72 +1,18 @@
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
|
||||
<Project ToolsVersion="15.0" Sdk="Microsoft.NET.Sdk.Web">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback>
|
||||
<GlobalExclude>$(GlobalExclude);bin\**;obj\**;node_modules\**;**\*.user;**\*.suo;**\*.*proj;.git\**</GlobalExclude>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="**\*" Exclude="$(GlobalExclude)"/>
|
||||
<Compile Include="**\*.cs" Exclude="$(GlobalExclude)" />
|
||||
<EmbeddedResource Include="**\*.resx" Exclude="$(GlobalExclude)" />
|
||||
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="1.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NETCore.App">
|
||||
<Version>1.1.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Sdk.Web">
|
||||
<Version>1.0.0-alpha-20161104-2-112</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics">
|
||||
<Version>1.1.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc">
|
||||
<Version>1.1.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Tools">
|
||||
<Version>1.1.0-preview4-final</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration">
|
||||
<Version>1.1.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel">
|
||||
<Version>1.1.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices">
|
||||
<Version>1.1.0-*</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles">
|
||||
<Version>1.1.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables">
|
||||
<Version>1.1.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json">
|
||||
<Version>1.1.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine">
|
||||
<Version>1.1.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging">
|
||||
<Version>1.1.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console">
|
||||
<Version>1.1.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug">
|
||||
<Version>1.1.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions">
|
||||
<Version>1.1.0</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<!-- Files not to show in IDE -->
|
||||
<None Remove=".bowerrc" />
|
||||
<None Remove="yarn.lock" />
|
||||
|
||||
<!-- Files not to publish (note that the 'dist' subfolders are re-added below) -->
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>8f5cb8a9-3086-4b49-a1c2-32a9f89bca11</ProjectGuid>
|
||||
<RootNamespace>Angular2Spa</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
||||
@@ -5,14 +5,12 @@ import { AppComponent } from './components/app/app.component'
|
||||
import { NavMenuComponent } from './components/navmenu/navmenu.component';
|
||||
import { HomeComponent } from './components/home/home.component';
|
||||
import { FetchDataComponent } from './components/fetchdata/fetchdata.component';
|
||||
import { CounterComponent } from './components/counter/counter.component';
|
||||
|
||||
@NgModule({
|
||||
bootstrap: [ AppComponent ],
|
||||
declarations: [
|
||||
AppComponent,
|
||||
NavMenuComponent,
|
||||
CounterComponent,
|
||||
FetchDataComponent,
|
||||
HomeComponent
|
||||
],
|
||||
@@ -21,7 +19,7 @@ import { CounterComponent } from './components/counter/counter.component';
|
||||
RouterModule.forRoot([
|
||||
{ path: '', redirectTo: 'home', pathMatch: 'full' },
|
||||
{ path: 'home', component: HomeComponent },
|
||||
{ path: 'counter', component: CounterComponent },
|
||||
{ path: 'counter', loadChildren: './components/counter/counter.module#CounterModule' },
|
||||
{ path: 'fetch-data', component: FetchDataComponent },
|
||||
{ path: '**', redirectTo: 'home' }
|
||||
])
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { CounterComponent } from './counter.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: CounterComponent }
|
||||
])
|
||||
],
|
||||
exports: [ RouterModule ],
|
||||
declarations: [ CounterComponent ]
|
||||
})
|
||||
export class CounterModule {}
|
||||
@@ -3,11 +3,18 @@ import { enableProdMode } from '@angular/core';
|
||||
import { platformUniversalDynamic } from 'angular2-universal';
|
||||
import { AppModule } from './app/app.module';
|
||||
import 'bootstrap';
|
||||
const rootElemTagName = 'app'; // Update this if you change your root component selector
|
||||
|
||||
// Enable either Hot Module Reloading or production mode
|
||||
if (module['hot']) {
|
||||
module['hot'].accept();
|
||||
module['hot'].dispose(() => { platform.destroy(); });
|
||||
module['hot'].dispose(() => {
|
||||
// Before restarting the app, we create a new root element and dispose the old one
|
||||
const oldRootElem = document.querySelector(rootElemTagName);
|
||||
const newRootElem = document.createElement(rootElemTagName);
|
||||
oldRootElem.parentNode.insertBefore(newRootElem, oldRootElem);
|
||||
platform.destroy();
|
||||
});
|
||||
} else {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'angular2-universal-polyfills';
|
||||
import 'angular2-universal-patch';
|
||||
import 'zone.js';
|
||||
import { createServerRenderer, RenderResult } from 'aspnet-prerendering';
|
||||
import { enableProdMode } from '@angular/core';
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
------------------------------------------------------------------
|
||||
Don't delete this file. Do include it in your source control repo.
|
||||
------------------------------------------------------------------
|
||||
|
||||
This file exists as a workaround for https://github.com/dotnet/cli/issues/1396
|
||||
('dotnet publish' does not publish any directories that didn't exist or were
|
||||
empty before the publish script started).
|
||||
|
||||
Hopefully, this can be removed after the move to the new MSBuild.
|
||||
@@ -20,7 +20,7 @@ module.exports = function (config) {
|
||||
browsers: ['Chrome'],
|
||||
mime: { 'application/javascript': ['ts','tsx'] },
|
||||
singleRun: false,
|
||||
webpack: require('../../webpack.config.js').filter(config => config.target !== 'node'), // Test against client bundle, because tests run in a browser
|
||||
webpack: require('../../webpack.config.js')().filter(config => config.target !== 'node'), // Test against client bundle, because tests run in a browser
|
||||
webpackMiddleware: { stats: 'errors-only' }
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
FROM microsoft/dotnet:1.1.0-sdk-projectjson
|
||||
|
||||
RUN apt-get update
|
||||
RUN wget -qO- https://deb.nodesource.com/setup_4.x | bash -
|
||||
RUN apt-get install -y build-essential nodejs
|
||||
|
||||
COPY . /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN ["dotnet", "restore"]
|
||||
RUN ["dotnet", "build"]
|
||||
|
||||
EXPOSE 5000/tcp
|
||||
|
||||
CMD ["dotnet", "run", "--server.urls", "http://*:5000"]
|
||||
@@ -4,7 +4,6 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
namespace WebApplicationBasic
|
||||
{
|
||||
@@ -12,13 +11,7 @@ namespace WebApplicationBasic
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var config = new ConfigurationBuilder()
|
||||
.AddCommandLine(args)
|
||||
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
|
||||
.Build();
|
||||
|
||||
var host = new WebHostBuilder()
|
||||
.UseConfiguration(config)
|
||||
.UseKestrel()
|
||||
.UseContentRoot(Directory.GetCurrentDirectory())
|
||||
.UseIISIntegration()
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"sdk": { "version": "1.0.0-preview2-1-003177" }
|
||||
"sdk": { "version": "sdkVersionInjectedHere" }
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user