Commit ce69a84

Anton Medvedev <anton@medv.io>
2021-08-27 23:05:05
Add path package
1 parent 33aaae4
index.d.ts
@@ -17,6 +17,7 @@ import {Readable, Writable} from 'stream'
 import * as _fs from 'fs-extra'
 import * as _globby from 'globby'
 import * as _os from 'os'
+import * as _path from 'path'
 import * as _chalk from 'chalk'
 import _fetch from 'node-fetch'
 import {ParsedArgs} from 'minimist'
@@ -62,9 +63,10 @@ export const cd: cd
 export const chalk: typeof _chalk
 export const fetch: typeof _fetch
 export const fs: typeof _fs
-export const globby: typeof _globby.globby & typeof _globby
 export const glob: typeof _globby.globby & typeof _globby
+export const globby: typeof _globby.globby & typeof _globby
 export const nothrow: nothrow
 export const os: typeof _os
+export const path: typeof _path
 export const question: question
 export const sleep: sleep
index.mjs
@@ -15,6 +15,7 @@
 import fs from 'fs-extra'
 import * as globbyModule from 'globby'
 import os from 'os'
+import path from 'path'
 import {promisify, inspect} from 'util'
 import {spawn} from 'child_process'
 import {createInterface} from 'readline'
@@ -23,7 +24,7 @@ import which from 'which'
 import chalk from 'chalk'
 import minimist from 'minimist'
 
-export {chalk, fs}
+export {chalk, fs, os, path}
 export const sleep = promisify(setTimeout)
 export const argv = minimist(process.argv.slice(2))
 export const globby = Object.assign(function globby(...args) {
README.md
@@ -258,6 +258,14 @@ The [os](https://nodejs.org/api/os.html) package.
 await $`cd ${os.homedir()} && mkdir example`
 ```
 
+#### `path` package
+
+The [path](https://nodejs.org/api/path.html) package.
+
+```js
+await $`mkdir ${path.join(basedir, 'output')}`
+```
+
 #### `minimist` package
 
 The [minimist](https://www.npmjs.com/package/minimist) package.
test.mjs
@@ -13,7 +13,6 @@
 // limitations under the License.
 
 import {strict as assert, deepEqual} from 'assert'
-import path from 'path'
 
 { // Only stdout is used during command substitution
   let hello = await $`echo Error >&2; echo Hello`