Browse Source

standalone javascript console

cl-refactor
Marek Kotewicz 10 years ago
parent
commit
2110162a4d
  1. 1
      libjsconsole/JSLocalConsole.cpp
  2. 2
      libjsconsole/JSLocalConsole.h
  3. 3
      libjsengine/JSResources.cmake
  4. 2
      libjsengine/JSV8Engine.cpp
  5. 3
      libjsengine/JSV8Engine.h

1
libjsconsole/JSLocalConsole.cpp

@ -21,7 +21,6 @@
*/
#include <iostream>
#include <libweb3jsonrpc/WebThreeStubServer.h>
#include "JSLocalConsole.h"
#include "JSV8Connector.h"

2
libjsconsole/JSLocalConsole.h

@ -34,8 +34,6 @@ namespace dev
namespace eth
{
class AccountHolder;
class JSLocalConsole: public JSConsole<JSV8Engine, JSV8Printer>
{
public:

3
libjsengine/JSResources.cmake

@ -1,8 +1,9 @@
set(web3 "${CMAKE_CURRENT_LIST_DIR}/../libjsqrc/ethereumjs/dist/web3.js")
set(admin "${CMAKE_CURRENT_LIST_DIR}/../libjsqrc/admin.js")
set(pretty_print "${CMAKE_CURRENT_LIST_DIR}/PrettyPrint.js")
set(common "${CMAKE_CURRENT_LIST_DIR}/Common.js")
set(ETH_RESOURCE_NAME "JSEngineResources")
set(ETH_RESOURCE_LOCATION "${CMAKE_CURRENT_BINARY_DIR}")
set(ETH_RESOURCES "web3" "pretty_print" "common")
set(ETH_RESOURCES "web3" "pretty_print" "common" "admin")

2
libjsengine/JSV8Engine.cpp

@ -143,9 +143,11 @@ JSV8Engine::JSV8Engine(): m_scope(new JSV8Scope())
JSEngineResources resources;
string common = resources.loadResourceAsString("common");
string web3 = resources.loadResourceAsString("web3");
string admin = resources.loadResourceAsString("admin");
eval(common.c_str());
eval(web3.c_str());
eval("web3 = require('web3');");
eval(admin.c_str());
}
JSV8Engine::~JSV8Engine()

3
libjsengine/JSV8Engine.h

@ -22,7 +22,10 @@
#pragma once
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
#include <v8.h>
#pragma clang diagnostic pop
#include "JSEngine.h"
namespace dev

Loading…
Cancel
Save