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
771ddbb5
Commit
771ddbb5
authored
May 24, 2021
by
aniket-engg
Committed by
Aniket
May 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
run hardhat conditionally
parent
17a70e08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
remixd.ts
libs/remixd/src/bin/remixd.ts
+10
-5
No files found.
libs/remixd/src/bin/remixd.ts
View file @
771ddbb5
...
@@ -4,7 +4,7 @@ import * as semver from 'semver'
...
@@ -4,7 +4,7 @@ import * as semver from 'semver'
import
WebSocket
from
'../websocket'
import
WebSocket
from
'../websocket'
import
*
as
servicesList
from
'../serviceList'
import
*
as
servicesList
from
'../serviceList'
import
*
as
WS
from
'ws'
// eslint-disable-line
import
*
as
WS
from
'ws'
// eslint-disable-line
import
{
getDomain
}
from
'../utils'
import
{
getDomain
,
absolutePath
}
from
'../utils'
import
Axios
from
'axios'
import
Axios
from
'axios'
import
*
as
fs
from
'fs-extra'
import
*
as
fs
from
'fs-extra'
import
*
as
path
from
'path'
import
*
as
path
from
'path'
...
@@ -81,10 +81,15 @@ function startService<S extends 'git' | 'hardhat' | 'folder'> (service: S, callb
...
@@ -81,10 +81,15 @@ function startService<S extends 'git' | 'hardhat' | 'folder'> (service: S, callb
sharedFolderClient
.
setupNotifications
(
program
.
sharedFolder
)
sharedFolderClient
.
setupNotifications
(
program
.
sharedFolder
)
sharedFolderClient
.
sharedFolder
(
program
.
sharedFolder
)
sharedFolderClient
.
sharedFolder
(
program
.
sharedFolder
)
})
})
startService
(
'hardhat'
,
(
ws
:
WS
,
sharedFolderClient
:
servicesList
.
Sharedfolder
)
=>
{
// Run hardhat service if a hardhat project is shared as folder
sharedFolderClient
.
setWebSocket
(
ws
)
const
hardhatConfigFilePath
=
absolutePath
(
'./'
,
program
.
sharedFolder
)
+
'/hardhat.config.js'
sharedFolderClient
.
sharedFolder
(
program
.
sharedFolder
)
const
isHardhatProject
=
fs
.
existsSync
(
hardhatConfigFilePath
)
})
if
(
isHardhatProject
)
{
startService
(
'hardhat'
,
(
ws
:
WS
,
sharedFolderClient
:
servicesList
.
Sharedfolder
)
=>
{
sharedFolderClient
.
setWebSocket
(
ws
)
sharedFolderClient
.
sharedFolder
(
program
.
sharedFolder
)
})
}
/*
/*
startService('git', (ws: WS, sharedFolderClient: servicesList.Sharedfolder) => {
startService('git', (ws: WS, sharedFolderClient: servicesList.Sharedfolder) => {
sharedFolderClient.setWebSocket(ws)
sharedFolderClient.setWebSocket(ws)
...
...
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