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
2ba9333c
Commit
2ba9333c
authored
Dec 04, 2018
by
0mkar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve via callback
parent
fcff184a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
combineSource.js
remix-resolve/src/combineSource.js
+2
-1
getFile.js
remix-resolve/src/getFile.js
+1
-0
test.js
remix-resolve/tests/test.js
+1
-1
No files found.
remix-resolve/src/combineSource.js
View file @
2ba9333c
...
...
@@ -28,7 +28,8 @@ const combineSource = async function (rootpath, sources) {
let
subSorce
=
{}
const
response
=
await
resolve
(
rootpath
,
fn
)
// sources[fileName].content = sources[fileName].content.replace(importLine, 'import' + extra + ' \'' + response.filename + '\';')
subSorce
[
fn
]
=
{
content
:
response
.
content
}
const
regex
=
/
(\.
+
\/)
/g
subSorce
[
fn
.
replace
(
regex
,
''
)]
=
{
content
:
response
.
content
}
sources
=
Object
.
assign
(
await
combineSource
(
response
.
rootpath
,
subSorce
),
sources
)
}
}
catch
(
e
)
{
...
...
remix-resolve/src/getFile.js
View file @
2ba9333c
const
getFile
=
function
(
path
,
sources
)
{
// return sources[path].content
return
sources
[
path
].
content
}
...
...
remix-resolve/tests/test.js
View file @
2ba9333c
...
...
@@ -165,7 +165,7 @@ describe('testRunner', function () {
const
findImportsSync
=
function
(
path
)
{
console
.
log
(
path
)
console
.
log
(
sources
)
// return rr.getFile(path, s
ources)
return
rr
.
getFile
(
path
,
combinedS
ources
)
}
try
{
results
=
solc
.
compile
(
JSON
.
stringify
(
input
),
findImportsSync
)
...
...
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