Skip to content

Commit 9532f47

Browse files
committed
NuGet package for VroomJs integration
1 parent 88b8094 commit 9532f47

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

build.proj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ of patent rights can be found in the PATENTS file in the same directory.
2727
<PackageAssemblies Include="System.Web.Optimization.React" />
2828
<PackageAssemblies Include="Cassette.React" />
2929
<PackageAssemblies Include="React.MSBuild" />
30+
<PackageAssemblies Include="React.JavaScriptEngine.VroomJs" />
3031
</ItemGroup>
3132

3233
<Import Project="$(MSBuildProjectDirectory)\tools\MSBuildTasks\MSBuild.Community.Tasks.Targets" />

src/React.JavaScriptEngine.VroomJs/React.JavaScriptEngine.VroomJs.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,17 @@
7070
</ItemGroup>
7171
<ItemGroup>
7272
<None Include="packages.config" />
73+
<None Include="React.JavaScriptEngine.VroomJs.nutrans" />
7374
</ItemGroup>
7475
<ItemGroup>
7576
<ProjectReference Include="..\React\React.csproj">
7677
<Project>{d0cc8a22-cee6-485c-924b-1f94426fea59}</Project>
7778
<Name>React</Name>
7879
</ProjectReference>
7980
</ItemGroup>
81+
<ItemGroup>
82+
<Content Include="readme.txt" />
83+
</ItemGroup>
8084
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
8185
<PropertyGroup>
8286
<PostBuildEvent>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (c) 2014, Facebook, Inc.
4+
All rights reserved.
5+
6+
This source code is licensed under the BSD-style license found in the
7+
LICENSE file in the root directory of this source tree. An additional grant
8+
of patent rights can be found in the PATENTS file in the same directory.
9+
-->
10+
<package
11+
xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"
12+
xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
13+
<metadata>
14+
<title xdt:Transform="Insert">ReactJS.NET - Mono Support</title>
15+
<description xdt:Transform="Insert">Mono support for ReactJS.NET, using VroomJs and V8. Allows you to use ReactJS.NET on Linux and Mac OS X. Install this package in addition to the regular ReactJS.NET packages (eg. React.Web.Mvc4 for ASP.NET MVC 4 integration).
16+
Please refer to project site (http://reactjs.net/) for more details, usage examples and sample code.
17+
</description>
18+
<tags xdt:Transform="Replace">asp.net mvc asp jquery javascript js react facebook reactjs mono linux mac macos v8</tags>
19+
</metadata>
20+
<files xdt:Transform="Insert">
21+
<file src="readme.txt" target="" />
22+
</files>
23+
</package>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
To use ReactJS.NET on Linux or Mac OS X, you need to compile VroomJs and V8. This can be
2+
accomplished using the following shell commands:
3+
4+
# Get a supported version of V8
5+
cd /usr/local/src/
6+
git clone https://github.com/v8/v8.git
7+
cd v8
8+
git checkout 3.15
9+
10+
# Build V8
11+
make werror=no library=shared x64.release
12+
13+
# Get ReactJS.NET's version of libvroomjs
14+
cd /usr/local/src/
15+
git clone https://github.com/reactjs/react.net.git
16+
cd react.net
17+
git submodule update --init
18+
cd lib/VroomJs/libvroomjs/
19+
20+
# Build libvroomjs
21+
g++ jsengine.cpp managedref.cpp bridge.cpp -o libvroomjs.so -shared -L /usr/local/src/v8/out/x64.release/lib.target/ -I /usr/local/src/v8/include/ -fPIC -Wl,--no-as-needed -lv8 -g
22+
cp libvroomjs.so /usr/local/lib/
23+
ldconfig
24+
25+
If VroomJs fails to load, run Mono with the `MONO_LOG_LEVEL=debug` environment variable to get
26+
more useful debugging information. Often, this occurs when Mono is unable to locate V8 (ie. it's
27+
not in /usr/lib/ or /usr/local/lib/)
28+
29+
For more information, please see the ReactJS.NET website at http://reactjs.net/

0 commit comments

Comments
 (0)