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
ed3abb38
Commit
ed3abb38
authored
May 13, 2021
by
aniket-engg
Committed by
Aniket
May 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compile only when enabled
parent
465bd76f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
compile-tab.js
apps/remix-ide/src/app/tabs/compile-tab.js
+1
-0
compileTab.js
apps/remix-ide/src/app/tabs/compileTab/compileTab.js
+2
-2
compilerContainer.js
apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js
+7
-2
No files found.
apps/remix-ide/src/app/tabs/compile-tab.js
View file @
ed3abb38
...
...
@@ -93,6 +93,7 @@ class CompileTab extends ViewPlugin {
this
.
on
(
'filePanel'
,
'setWorkspace'
,
(
workspace
)
=>
{
this
.
compileTabLogic
.
isHardhatProject
().
then
((
result
)
=>
{
if
(
result
)
this
.
compilerContainer
.
hardhatCompilation
.
style
.
display
=
'flex'
else
this
.
compilerContainer
.
hardhatCompilation
.
style
.
display
=
'none'
})
})
...
...
apps/remix-ide/src/app/tabs/compileTab/compileTab.js
View file @
ed3abb38
...
...
@@ -84,10 +84,10 @@ class CompileTab {
}
else
return
false
}
runCompiler
()
{
runCompiler
(
hhCompilation
)
{
try
{
console
.
log
(
'mode is - '
,
this
.
fileManager
.
mode
)
if
(
this
.
fileManager
.
mode
===
'localhost'
)
{
if
(
this
.
fileManager
.
mode
===
'localhost'
&&
hhCompilation
)
{
const
{
currentVersion
,
optimize
,
runs
}
=
this
.
compiler
.
state
const
fileContent
=
`module.exports = {
solidity: '
${
currentVersion
.
substring
(
0
,
currentVersion
.
indexOf
(
'+commit'
))}
',
...
...
apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js
View file @
ed3abb38
...
...
@@ -15,6 +15,7 @@ class CompilerContainer {
this
.
editor
=
editor
this
.
config
=
config
this
.
queryParams
=
queryParams
this
.
hhCompilation
=
false
this
.
data
=
{
hideWarnings
:
config
.
get
(
'hideWarnings'
)
||
false
,
...
...
@@ -184,7 +185,7 @@ class CompilerContainer {
})
this
.
hardhatCompilation
=
yo
`<div class="mt-2
${
css
.
compilerConfig
}
custom-control custom-checkbox" style="display:none">
<input class="
${
css
.
autocompile
}
custom-control-input" id="enableHardhat" type="checkbox" title="Enable Hardhat Compilation">
<input class="
${
css
.
autocompile
}
custom-control-input"
onchange=
${(
e
)
=>
this
.
updatehhCompilation
(
e
)}
id="enableHardhat" type="checkbox" title="Enable Hardhat Compilation">
<label class="form-check-label custom-control-label" for="enableHardhat">Enable Hardhat Compilation</label>
</div>`
this
.
_view
.
warnCompilationSlow
=
yo
`<i title="Compilation Slow" style="visibility:hidden" class="
${
css
.
warnCompilationSlow
}
fas fa-exclamation-triangle" aria-hidden="true"></i>`
...
...
@@ -331,12 +332,16 @@ class CompilerContainer {
this
.
config
.
set
(
'autoCompile'
,
this
.
_view
.
autoCompile
.
checked
)
}
updatehhCompilation
(
event
)
{
this
.
hhCompilation
=
event
.
target
.
checked
}
compile
(
event
)
{
const
currentFile
=
this
.
config
.
get
(
'currentFile'
)
if
(
!
this
.
isSolFileSelected
())
return
this
.
_setCompilerVersionFromPragma
(
currentFile
)
this
.
compileTabLogic
.
runCompiler
()
this
.
compileTabLogic
.
runCompiler
(
this
.
hhCompilation
)
}
compileIfAutoCompileOn
()
{
...
...
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