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
afcae85b
Commit
afcae85b
authored
Jul 18, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
help message in terminal
parent
97a01ea0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
cmdInterpreterAPI.js
src/lib/cmdInterpreterAPI.js
+20
-1
No files found.
src/lib/cmdInterpreterAPI.js
View file @
afcae85b
'use strict'
var
yo
=
require
(
'yo-yo'
)
var
async
=
require
(
'async'
)
var
remixLib
=
require
(
'remix-lib'
)
var
EventManager
=
remixLib
.
EventManager
...
...
@@ -18,6 +19,14 @@ class CmdInterpreterAPI {
app
:
self
.
_components
.
registry
.
get
(
'app'
).
api
,
editor
:
self
.
_components
.
registry
.
get
(
'editor'
).
api
}
self
.
commandHelp
=
{
'remix.debug(hash)'
:
'Start debugging a transaction.'
,
'remix.loadgist(id)'
:
'Load a gist in the file explorer.'
,
'remix.loadurl(url)'
:
'Load the given url in the file explorer. The url can be of type github, swarm or ipfs.'
,
'remix.setproviderurl(url)'
:
'Change the current provider to Web3 provider and set the url endpoint.'
,
'remix.exeCurrent()'
:
'Run the script currenttly displayed in the editor'
,
'remix.help()'
:
'Display this help message'
}
}
debug
(
hash
,
cb
)
{
const
self
=
this
...
...
@@ -33,7 +42,7 @@ class CmdInterpreterAPI {
const
self
=
this
self
.
_deps
.
app
.
importExternal
(
url
,
(
err
,
content
)
=>
{
if
(
err
)
{
toolTip
(
`Unable to load
${
url
}
from swarm
:
${
err
}
`
)
toolTip
(
`Unable to load
${
url
}
:
${
err
}
`
)
if
(
cb
)
cb
(
err
)
}
else
{
try
{
...
...
@@ -70,6 +79,16 @@ class CmdInterpreterAPI {
}
self
.
_components
.
terminal
.
commands
.
script
(
content
)
}
help
(
cb
)
{
const
self
=
this
var
help
=
yo
`<div></div>`
for
(
var
k
in
self
.
commandHelp
)
{
help
.
appendChild
(
yo
`<div>
${
k
}
:
${
self
.
commandHelp
[
k
]}
</div>`
)
}
self
.
_components
.
terminal
.
commands
.
html
(
help
)
if
(
cb
)
cb
()
return
''
}
}
module
.
exports
=
CmdInterpreterAPI
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