diff --git a/.gitignore b/.gitignore
index 7a3b16cd1e..842e0d0e4f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -276,3 +276,5 @@ slnx.sqlite
launchSettings.json
+yarn.lock
+
diff --git a/.travis.yml b/.travis.yml
index 67a09417c8..dbd2d1fbcc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,6 +5,8 @@ dotnet: 2.2
dist: xenial
before_install:
- bash scripts/install_protobuf.sh
+ - nvm install node
+ - npm install -g yarn
install:
- export DOTNET_CLI_TELEMETRY_OPTOUT=1
before_script:
diff --git a/AElf.CLI/AElf.CLI.csproj b/AElf.CLI/AElf.CLI.csproj
index 2e49f7e65b..2d319fb2d8 100644
--- a/AElf.CLI/AElf.CLI.csproj
+++ b/AElf.CLI/AElf.CLI.csproj
@@ -4,6 +4,9 @@
netcoreapp2.2
true
+
+
+
@@ -19,13 +22,13 @@
-
+
diff --git a/AElf.CLI/JS/JSEngine.cs b/AElf.CLI/JS/JSEngine.cs
index 56f088c8d9..6796a65378 100644
--- a/AElf.CLI/JS/JSEngine.cs
+++ b/AElf.CLI/JS/JSEngine.cs
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
-using System.ComponentModel;
-using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
@@ -11,10 +9,6 @@
using AElf.CLI.JS.IO;
using AElf.CLI.JS.Net;
using AElf.CLI.Utils;
-using AElf.Common;
-using AElf.JSDK;
-using Alba.CsConsoleFormat;
-using Alba.CsConsoleFormat.Fluent;
using ChakraCore.NET;
using ChakraCore.NET.API;
using ChakraCore.NET.Debug;
@@ -94,8 +88,8 @@ public JSEngine(IConsole console, BaseOption option,
private void LoadAelfJs()
{
- RunScript(Assembly.LoadFrom(Assembly.GetAssembly(typeof(StaticResource)).Location)
- .GetManifestResourceStream("AElf.JSDK.content.aelf.js"));
+ RunScript(Assembly.LoadFrom(Assembly.GetAssembly(typeof(JSEngine)).Location)
+ .GetManifestResourceStream("AElf.CLI.Scripts.aelf.js"));
RunScript(@"Aelf = require('aelf');");
}
diff --git a/AElf.CLI/Scripts/aelf.js b/AElf.CLI/Scripts/aelf.js
index 1e54869811..c16f228538 120000
--- a/AElf.CLI/Scripts/aelf.js
+++ b/AElf.CLI/Scripts/aelf.js
@@ -1 +1 @@
-../aelf-sdk/dist/aelf.js
\ No newline at end of file
+../node_modules/aelf-sdk/dist/aelf.js
\ No newline at end of file
diff --git a/AElf.CLI/package.json b/AElf.CLI/package.json
new file mode 100644
index 0000000000..af06031d2b
--- /dev/null
+++ b/AElf.CLI/package.json
@@ -0,0 +1,8 @@
+{
+ "version": "1.0.0",
+ "name": "aelf.cli",
+ "private": true,
+ "dependencies": {
+ "aelf-sdk": "latest"
+ }
+}