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
ec9c4748
Commit
ec9c4748
authored
Jun 19, 2020
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Emit folder added event from plugin
parent
dc911505
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
package.json
package.json
+1
-1
remixdClient.ts
src/services/remixdClient.ts
+8
-1
utils.ts
src/utils.ts
+3
-1
No files found.
package.json
View file @
ec9c4748
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
},
},
"scripts"
:
{
"scripts"
:
{
"test"
:
"echo
\"
Error: no test specified
\"
"
,
"test"
:
"echo
\"
Error: no test specified
\"
"
,
"start"
:
"./lib/bin/remixd.js"
,
"start"
:
"./lib/bin/remixd.js
-s ./shared --remix-ide http://127.0.0.1:8080
"
,
"npip"
:
"npip"
,
"npip"
:
"npip"
,
"lint"
:
"eslint ./src --ext .ts"
,
"lint"
:
"eslint ./src --ext .ts"
,
"build"
:
"tsc -p ./ && chmod +x ./lib/bin/remixd.js"
,
"build"
:
"tsc -p ./ && chmod +x ./lib/bin/remixd.js"
,
...
...
src/services/remixdClient.ts
View file @
ec9c4748
...
@@ -94,7 +94,14 @@ export class RemixdClient extends PluginClient {
...
@@ -94,7 +94,14 @@ export class RemixdClient extends PluginClient {
}
}
this
.
trackDownStreamUpdate
[
path
]
=
path
this
.
trackDownStreamUpdate
[
path
]
=
path
if
(
isFolder
)
{
if
(
isFolder
)
{
fs
.
mkdirp
(
path
).
then
(()
=>
resolve
()).
catch
((
e
:
Error
)
=>
reject
(
e
))
fs
.
mkdirp
(
path
).
then
(()
=>
{
const
splitPath
=
path
.
split
(
'/'
)
splitPath
.
pop
()
const
parentDir
=
splitPath
.
join
(
'/'
)
+
'/'
this
.
emit
(
'folderAdded'
,
parentDir
)
resolve
()
}).
catch
((
e
:
Error
)
=>
reject
(
e
))
}
else
{
}
else
{
fs
.
ensureFile
(
path
).
then
(()
=>
{
fs
.
ensureFile
(
path
).
then
(()
=>
{
fs
.
writeFile
(
path
,
args
.
content
,
'utf8'
,
(
error
:
Error
)
=>
{
fs
.
writeFile
(
path
,
args
.
content
,
'utf8'
,
(
error
:
Error
)
=>
{
...
...
src/utils.ts
View file @
ec9c4748
...
@@ -14,7 +14,9 @@ const pathModule = require('path')
...
@@ -14,7 +14,9 @@ const pathModule = require('path')
*/
*/
function
absolutePath
(
path
:
string
,
sharedFolder
:
string
):
string
{
function
absolutePath
(
path
:
string
,
sharedFolder
:
string
):
string
{
path
=
normalizePath
(
path
)
path
=
normalizePath
(
path
)
if
(
path
.
indexOf
(
sharedFolder
)
!==
0
)
{
const
exists
=
fs
.
existsSync
(
'/'
+
path
)
if
(
!
exists
&&
path
.
indexOf
(
sharedFolder
)
!==
0
)
{
path
=
pathModule
.
resolve
(
sharedFolder
,
path
)
path
=
pathModule
.
resolve
(
sharedFolder
,
path
)
}
}
return
path
return
path
...
...
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