Skip to content

Commit 1d81711

Browse files
committed
Meta tweaks
1 parent 2014972 commit 1d81711

File tree

6 files changed

+14
-25
lines changed

6 files changed

+14
-25
lines changed

.github/workflows/main.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
node-version:
13+
- 16
1314
- 14
1415
- 12
1516
steps:
1617
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v1
18+
- uses: actions/setup-node@v2
1819
with:
1920
node-version: ${{ matrix.node-version }}
2021
- run: npm install

cli.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env node
2-
32
import meow from 'meow';
43
import makeDir from 'make-dir';
54

@@ -14,12 +13,12 @@ const cli = meow(`
1413
$ make-dir unicorn/awesome foo/bar
1514
$ make-dir rainbow --mode=0666
1615
`, {
16+
importMeta: import.meta,
1717
flags: {
1818
mode: {
1919
type: 'string'
2020
}
21-
},
22-
importMeta: import.meta
21+
}
2322
});
2423

2524
const {input: directories} = cli;

license

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
3+
Copyright (c) Sindre Sorhus <[email protected]> (https://sindresorhus.com)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

package.json

+6-8
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"description": "Make directories and their parents if needed - Like `mkdir -p`, but cross-platform",
55
"license": "MIT",
66
"repository": "sindresorhus/make-dir-cli",
7+
"funding": "https://github.com/sponsors/sindresorhus",
78
"author": {
89
"name": "Sindre Sorhus",
910
"email": "[email protected]",
10-
"url": "sindresorhus.com"
11+
"url": "https://sindresorhus.com"
1112
},
1213
"type": "module",
13-
"exports": "./cli.js",
1414
"bin": {
15-
"make-dir": "cli.js"
15+
"make-dir": "./cli.js"
1616
},
1717
"engines": {
1818
"node": ">=12.17"
@@ -30,8 +30,6 @@
3030
"mkdirp",
3131
"make",
3232
"directories",
33-
"dir",
34-
"dirs",
3533
"folders",
3634
"directory",
3735
"folder",
@@ -51,13 +49,13 @@
5149
"windows"
5250
],
5351
"dependencies": {
54-
"make-dir": "^2.0.0",
52+
"make-dir": "^3.1.0",
5553
"meow": "^10.0.0"
5654
},
5755
"devDependencies": {
5856
"ava": "^3.15.0",
59-
"execa": "^1.0.0",
60-
"tempy": "^0.2.1",
57+
"execa": "^5.0.0",
58+
"tempy": "^1.0.1",
6159
"xo": "^0.39.1"
6260
}
6361
}

readme.md

-9
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
> Make directories and their parents if needed - Like `mkdir -p`, but cross-platform
44
5-
65
## Install
76

87
```
98
$ npm install --global make-dir-cli
109
```
1110

12-
1311
## Usage
1412

1513
```
@@ -42,7 +40,6 @@ $ tree
4240
└── cake
4341
```
4442

45-
4643
## Tip
4744

4845
Create a shell alias for less typing:
@@ -51,13 +48,7 @@ Create a shell alias for less typing:
5148
alias md=make-dir
5249
```
5350

54-
5551
## Related
5652

5753
- [make-dir](https://github.com/sindresorhus/make-dir) - API for this module
5854
- [del-cli](https://github.com/sindresorhus/del-cli) - Delete files and directories
59-
60-
61-
## License
62-
63-
MIT © [Sindre Sorhus](https://sindresorhus.com)

test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import fs from 'fs';
2-
import path from 'path';
1+
import fs from 'node:fs';
2+
import path from 'node:path';
33
import test from 'ava';
44
import execa from 'execa';
55
import tempy from 'tempy';
@@ -9,7 +9,7 @@ test('main', async t => {
99
path.join(tempy.directory(), 'foo/unicorn'),
1010
path.join(tempy.directory(), 'bar/rainbow')
1111
];
12-
await execa.stdout('./cli.js', paths);
12+
await execa('./cli.js', paths);
1313
t.true(fs.existsSync(paths[0]));
1414
t.true(fs.existsSync(paths[1]));
1515
});

0 commit comments

Comments
 (0)