Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
748aef29
Commit
748aef29
authored
Jan 31, 2018
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make compiler more node friendly
parent
2e2d9df3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
package.json
remix-solidity/package.json
+4
-2
compiler.js
remix-solidity/src/compiler/compiler.js
+8
-1
No files found.
remix-solidity/package.json
View file @
748aef29
...
@@ -24,13 +24,15 @@
...
@@ -24,13 +24,15 @@
"remix-core"
:
"latest"
,
"remix-core"
:
"latest"
,
"remix-lib"
:
"latest"
,
"remix-lib"
:
"latest"
,
"webworkify"
:
"^1.2.1"
,
"webworkify"
:
"^1.2.1"
,
"solc"
:
"^0.4.13"
,
"solc"
:
"https://github.com/ethereum/solc-js"
,
"npm-run-all"
:
"^4.0.2"
,
"standard"
:
"^7.0.1"
,
"standard"
:
"^7.0.1"
,
"tape"
:
"^4.6.0"
"tape"
:
"^4.6.0"
},
},
"scripts"
:
{
"scripts"
:
{
"test"
:
"standard && npm run downloadsolc && tape ./test/tests.js"
,
"test"
:
"standard && npm run downloadsolc && tape ./test/tests.js"
,
"downloadsolc"
:
"test -e soljson.js || wget https://ethereum.github.io/solc-bin/soljson.js"
"downloadsolc"
:
"cd node_modules/solc && (test -e soljson.js || wget https://ethereum.github.io/solc-bin/soljson.js) && cd .."
,
"prepublish"
:
"mkdirp build; npm-run-all -ls downloadsolc"
},
},
"standard"
:
{
"standard"
:
{
"ignore"
:
[
"ignore"
:
[
...
...
remix-solidity/src/compiler/compiler.js
View file @
748aef29
...
@@ -72,7 +72,12 @@ function Compiler (handleImportCall) {
...
@@ -72,7 +72,12 @@ function Compiler (handleImportCall) {
function
onInternalCompilerLoaded
()
{
function
onInternalCompilerLoaded
()
{
if
(
worker
===
null
)
{
if
(
worker
===
null
)
{
var
compiler
=
solc
(
window
.
Module
)
var
compiler
;
if
(
typeof
(
window
)
==
'undefined'
)
{
compiler
=
require
(
'solc'
);
}
else
{
compiler
=
solc
(
window
.
Module
)
}
compileJSON
=
function
(
source
,
optimize
,
cb
)
{
compileJSON
=
function
(
source
,
optimize
,
cb
)
{
var
missingInputs
=
[]
var
missingInputs
=
[]
...
@@ -95,6 +100,7 @@ function Compiler (handleImportCall) {
...
@@ -95,6 +100,7 @@ function Compiler (handleImportCall) {
onCompilerLoaded
(
compiler
.
version
())
onCompilerLoaded
(
compiler
.
version
())
}
}
}
}
this
.
onInternalCompilerLoaded
=
onInternalCompilerLoaded
;
// exposed for use in node
this
.
lastCompilationResult
=
{
this
.
lastCompilationResult
=
{
data
:
null
,
data
:
null
,
...
@@ -215,6 +221,7 @@ function Compiler (handleImportCall) {
...
@@ -215,6 +221,7 @@ function Compiler (handleImportCall) {
}
}
}
}
// TODO: needs to be changed to be more node friendly
this
.
loadVersion
=
function
(
usingWorker
,
url
)
{
this
.
loadVersion
=
function
(
usingWorker
,
url
)
{
console
.
log
(
'Loading '
+
url
+
' '
+
(
usingWorker
?
'with worker'
:
'without worker'
))
console
.
log
(
'Loading '
+
url
+
' '
+
(
usingWorker
?
'with worker'
:
'without worker'
))
self
.
event
.
trigger
(
'loadingCompiler'
,
[
url
,
usingWorker
])
self
.
event
.
trigger
(
'loadingCompiler'
,
[
url
,
usingWorker
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment