Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 398a838

Browse files
authored
Merge pull request #1 from aspnet/dev
sync from the origin repo
2 parents 9c1c1b4 + 3c2fd50 commit 398a838

126 files changed

Lines changed: 1849 additions & 1194 deletions

File tree

Some content is hidden

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

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# JavaScriptServices
22

3+
AppVeyor: [![AppVeyor](https://ci.appveyor.com/api/projects/status/gprilrckx116vc9m/branch/dev?svg=true)](https://ci.appveyor.com/project/aspnetci/javascriptservices/branch/dev)
4+
35
This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [Home](https://github.com/aspnet/home) repo.
46

57
## What is this?

‎appveyor.yml‎

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,47 @@
11
init:
22
- git config --global core.autocrlf true
3+
install:
4+
- ps: Install-Product node 6.9.2 x64
5+
# .NET Core SDK binaries
6+
# Download .NET Core SDK and add to PATH
7+
- ps: $urlCurrent = "https://go.microsoft.com/fwlink/?LinkID=834991"
8+
- ps: $urlPreview = "https://dotnetcli.blob.core.windows.net/dotnet/Sdk/rel-1.0.0/dotnet-dev-win-x64.latest.zip"
9+
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetsdk"
10+
- ps: mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null
11+
- ps: $tempFileCurrent = [System.IO.Path]::GetTempFileName()
12+
- ps: $tempFilePreview = [System.IO.Path]::GetTempFileName()
13+
- ps: (New-Object System.Net.WebClient).DownloadFile($urlCurrent, $tempFileCurrent)
14+
- ps: (New-Object System.Net.WebClient).DownloadFile($urlPreview, $tempFilePreview)
15+
- ps: Add-Type -AssemblyName System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory($tempFileCurrent, $env:DOTNET_INSTALL_DIR)
16+
- ps: Add-Type -AssemblyName System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory($tempFilePreview, $env:DOTNET_INSTALL_DIR + "preview")
17+
- ps: Copy-Item "${env:DOTNET_INSTALL_DIR}preview\*" "${env:DOTNET_INSTALL_DIR}" -Force -Recurse
18+
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
319
build_script:
4-
- build.cmd verify
20+
- ps: Push-Location
21+
- cd templates/package-builder
22+
- npm install
23+
- npm run build
24+
- ps: Pop-Location
25+
artifacts:
26+
- path: templates\package-builder\dist\artifacts\generator-aspnetcore-spa.tar.gz
27+
name: generator-aspnetcore-spa
28+
- path: templates\package-builder\dist\artifacts\*.nupkg
29+
name: Microsoft.AspNetCore.SpaTemplates
30+
type: NuGetPackage
31+
# - build.cmd verify
532
clone_depth: 1
6-
test: off
33+
test_script:
34+
# - dotnet restore ./src
35+
# - npm install -g selenium-standalone
36+
# - selenium-standalone install
37+
# The nosys flag is needed for selenium to work on Appveyor
38+
# - ps: Start-Process selenium-standalone 'start','--','-Djna.nosys=true'
39+
# - ps: Push-Location
40+
# - cd test
41+
# - npm install
42+
# - npm test
43+
on_finish :
44+
# - ps: Pop-Location
45+
# After running tests, upload results to Appveyor
46+
# - ps: (new-object net.webclient).UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test\tmp\junit\*.xml))
747
deploy: off

‎global.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"projects": ["src"]
2+
"projects": ["src"],
3+
"sdk": { "version": "1.0.0-preview2-1-003177" }
34
}

‎makefile.shade‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
var VERSION='0.1'
33
var FULL_VERSION='0.1'
44
var AUTHORS='Microsoft Open Technologies, Inc.'
5-
var SAMPLES_PROJECT_GLOB='templates/*/project.json'
5+
var TEST_PROJECT_GLOB='templates/*/project.json'
6+
var SAMPLES_PROJECT_GLOB='samples/misc/*/project.json'
7+
8+
@{
9+
// The build quality values are set in each of the project.json files
10+
BuildQuality = "";
11+
}
612

713
use-standard-lifecycle
814
k-standard-goals

‎samples/misc/Webpack/ActionResults/PrerenderResult.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ public override async Task ExecuteResultAsync(ActionContext context)
3838
request.GetEncodedUrl(),
3939
request.Path + request.QueryString.Value,
4040
_dataToSupply,
41-
/* timeoutMilliseconds */ 30000
41+
/* timeoutMilliseconds */ 30000,
42+
/* requestPathBase */ "/"
4243
);
4344

4445
response.ContentType = "text/html";

‎samples/react/MusicStore/ReactApp/configureStore.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createStore, applyMiddleware, compose, combineReducers, GenericStoreEnhancer } from 'redux';
1+
import { createStore, applyMiddleware, compose, combineReducers, GenericStoreEnhancer, Store as ReduxStore } from 'redux';
22
import thunk from 'redux-thunk';
33
import { routerReducer } from 'react-router-redux';
44
import * as Store from './store';
@@ -16,7 +16,7 @@ export default function configureStore(initialState?: Store.ApplicationState) {
1616

1717
// Combine all reducers and instantiate the app-wide store instance
1818
const allReducers = buildRootReducer(Store.reducers);
19-
const store = createStoreWithMiddleware(allReducers, initialState) as Redux.Store<Store.ApplicationState>;
19+
const store = createStoreWithMiddleware(allReducers, initialState) as ReduxStore<Store.ApplicationState>;
2020

2121
// Enable Webpack hot module replacement for reducers
2222
if (module.hot) {

‎samples/react/MusicStore/package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "music-store",
33
"version": "0.0.0",
44
"dependencies": {
5+
"@types/history": "^2.0.0",
56
"@types/react": "^0.14.29",
67
"@types/react-bootstrap": "^0.0.35",
78
"@types/react-dom": "^0.14.14",
@@ -41,7 +42,7 @@
4142
"redux-typed": "^2.0.0",
4243
"style-loader": "^0.13.0",
4344
"ts-loader": "^0.8.1",
44-
"typescript": "2.0.3",
45+
"typescript": "^2.0.3",
4546
"url-loader": "^0.5.7",
4647
"webpack": "^1.13.2",
4748
"webpack-hot-middleware": "^2.12.2",

‎samples/react/MusicStore/tsconfig.json‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
{
22
"compilerOptions": {
3+
"baseUrl": ".",
34
"moduleResolution": "node",
45
"target": "es6",
56
"jsx": "preserve",
67
"sourceMap": true,
78
"experimentalDecorators": true,
8-
"types": [ "webpack-env", "whatwg-fetch" ]
9+
"types": [ "webpack-env", "whatwg-fetch" ],
10+
"paths": {
11+
// Fix "Duplicate identifier" errors caused by multiple dependencies fetching their own copies of type definitions.
12+
// We tell TypeScript which type definitions module to treat as the canonical one (instead of combining all of them).
13+
"history": ["./node_modules/@types/history/index"],
14+
"redux": ["./node_modules/@types/redux/index"],
15+
"react": ["./node_modules/@types/react/index"]
16+
}
917
},
1018
"exclude": [
1119
"node_modules"

‎src/Microsoft.AspNetCore.AngularServices/npm/.gitignore‎

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

‎src/Microsoft.AspNetCore.AngularServices/npm/.npmignore‎

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

0 commit comments

Comments
 (0)