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
3dd02801
Commit
3dd02801
authored
May 13, 2021
by
aniket-engg
Committed by
Aniket
May 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not compile in read only mode
parent
ed3abb38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
hardhatClient.ts
libs/remixd/src/services/hardhatClient.ts
+6
-6
No files found.
libs/remixd/src/services/hardhatClient.ts
View file @
3dd02801
...
...
@@ -9,7 +9,6 @@ export class HardhatClient extends PluginClient {
constructor
(
private
readOnly
=
false
)
{
super
()
console
.
log
(
'this is HardhatClient constructor'
)
this
.
methods
=
[
'compile'
]
}
...
...
@@ -22,12 +21,13 @@ export class HardhatClient extends PluginClient {
}
compile
(
configPath
:
string
)
{
const
cmd
=
`npx hardhat compile --config
${
configPath
}
`
const
options
=
{
cwd
:
this
.
currentSharedFolder
,
shell
:
true
}
const
child
=
spawn
(
cmd
,
options
)
let
result
=
''
let
error
=
''
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
this
.
readOnly
)
return
reject
(
new
Error
(
'Cannot run Hardhat compilation in read-only mode'
))
const
cmd
=
`npx hardhat compile --config
${
configPath
}
`
const
options
=
{
cwd
:
this
.
currentSharedFolder
,
shell
:
true
}
const
child
=
spawn
(
cmd
,
options
)
let
result
=
''
let
error
=
''
child
.
stdout
.
on
(
'data'
,
(
data
)
=>
{
console
.
log
(
'data in compile in HardhatClient'
,
data
)
result
+=
data
.
toString
()
...
...
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