mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
Fix some build issues
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { renderToString } from 'react-dom/server';
|
import { renderToString } from 'react-dom/server';
|
||||||
import { match, RouterContext } from 'react-router';
|
import { match, RouterContext } from 'react-router';
|
||||||
import createMemoryHistory from 'history/lib/createMemoryHistory';
|
|
||||||
import { routes } from './components/ReactApp';
|
import { routes } from './components/ReactApp';
|
||||||
React;
|
React;
|
||||||
|
|
||||||
@@ -14,7 +13,6 @@ export default function renderApp (params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Build an instance of the application
|
// Build an instance of the application
|
||||||
const history = createMemoryHistory(params.url);
|
|
||||||
const app = <RouterContext {...renderProps} />;
|
const app = <RouterContext {...renderProps} />;
|
||||||
|
|
||||||
// Render it as an HTML string which can be injected into the response
|
// Render it as an HTML string which can be injected into the response
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
"typings": "dist/Exports",
|
"typings": "dist/Exports",
|
||||||
"author": "Microsoft",
|
"author": "Microsoft",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"peerDependencies": {
|
"dependencies": {
|
||||||
"angular2": "2.0.0-beta.1",
|
"angular2": "2.0.0-beta.1",
|
||||||
"rxjs": "5.0.0-beta.0"
|
"rxjs": "5.0.0-beta.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,7 +3,15 @@ using Microsoft.Extensions.PlatformAbstractions;
|
|||||||
|
|
||||||
namespace Microsoft.AspNet.NodeServices {
|
namespace Microsoft.AspNet.NodeServices {
|
||||||
public static class Configuration {
|
public static class Configuration {
|
||||||
private static string[] defaultWatchFileExtensions = new[] { ".js", ".jsx", ".ts", ".tsx", ".json", ".html" };
|
private readonly static string[] defaultWatchFileExtensions = new[] { ".js", ".jsx", ".ts", ".tsx", ".json", ".html" };
|
||||||
|
private readonly static NodeServicesOptions defaultOptions = new NodeServicesOptions {
|
||||||
|
HostingModel = NodeHostingModel.Http,
|
||||||
|
WatchFileExtensions = defaultWatchFileExtensions
|
||||||
|
};
|
||||||
|
|
||||||
|
public static void AddNodeServices(this IServiceCollection serviceCollection) {
|
||||||
|
AddNodeServices(serviceCollection, defaultOptions);
|
||||||
|
}
|
||||||
|
|
||||||
public static void AddNodeServices(this IServiceCollection serviceCollection, NodeServicesOptions options) {
|
public static void AddNodeServices(this IServiceCollection serviceCollection, NodeServicesOptions options) {
|
||||||
serviceCollection.AddSingleton(typeof(INodeServices), (serviceProvider) => {
|
serviceCollection.AddSingleton(typeof(INodeServices), (serviceProvider) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user