diff --git a/src/index.ts b/src/index.ts index 99aeaaf..f87cc70 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,4 @@ +import cd from './lib/cd'; import cp_r from './lib/cp_r'; import ls from './lib/ls'; import mkdir_p from './lib/mkdir_p'; @@ -10,6 +11,7 @@ import rm_rf from './lib/rm_rf'; declare var wx: any; const Fileutils = { + cd, cp_r, ls, mkdir_p, diff --git a/src/lib/cd.ts b/src/lib/cd.ts new file mode 100644 index 0000000..9d2d907 --- /dev/null +++ b/src/lib/cd.ts @@ -0,0 +1,3 @@ +export default (dir) => { + return process.chdir(dir); +};