File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,6 @@ const extractCommands = (args) => {
26
26
return commands
27
27
}
28
28
29
- const extractFileArray = ( output ) => {
30
- output = output . replace ( / ' / g, '"' ) ;
31
- output = output . split ( 'OK' )
32
- let files = output [ 2 ] || ''
33
- files = files . slice ( 0 , files . indexOf ( ']' ) + 1 )
34
- files = JSON . parse ( files )
35
- return files
36
- }
37
-
38
29
function ensurePort ( port ) {
39
30
if ( ! port ) throw new Error ( 'You must specify a port.' )
40
31
}
@@ -55,8 +46,7 @@ const listFiles = (args, port) => {
55
46
const folder = args [ 0 ] || '/'
56
47
try {
57
48
const output = await board . fs_ls ( folder )
58
- const files = extractFileArray ( output )
59
- console . log ( `files at "${ folder } "` , files )
49
+ console . log ( `files at "${ folder } "` , output )
60
50
} catch ( e ) {
61
51
console . log ( 'error' , e )
62
52
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " micropython.js" ,
3
- "version" : " 1.2.0 " ,
3
+ "version" : " 1.2.1 " ,
4
4
"description" : " Interpretation of pyboard.py in javascript" ,
5
5
"main" : " micropython.js" ,
6
6
"scripts" : {
You can’t perform that action at this time.
0 commit comments