pizza-for 1.0.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +6 -9
- package/eslint.config.js +12 -0
- package/package.json +7 -6
- package/readme.md +1 -1
- package/.eslintrc.js +0 -5
package/bin/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const boxen = require( "boxen" );
|
|
2
|
+
import yargs from "yargs/yargs";
|
|
3
|
+
import { hideBin } from "yargs/helpers";
|
|
4
|
+
import howManyPizza from "how-many-pizza";
|
|
5
|
+
import chalk from "chalk";
|
|
6
|
+
import boxen from "boxen";
|
|
8
7
|
|
|
9
8
|
const boxenOptions = {
|
|
10
9
|
padding: 1,
|
|
@@ -12,7 +11,7 @@ const boxenOptions = {
|
|
|
12
11
|
borderStyle: "round"
|
|
13
12
|
};
|
|
14
13
|
|
|
15
|
-
const options = yargs
|
|
14
|
+
const options = yargs( hideBin( process.argv ) )
|
|
16
15
|
.usage( "$0 <number-of-people> [--slices-per-person=3] [--slices-per-pizza=8]" )
|
|
17
16
|
.demand( 1 )
|
|
18
17
|
.default( "slices-per-pizza", 8 )
|
|
@@ -32,6 +31,4 @@ const output = [
|
|
|
32
31
|
chalk.cyan( pizzaText )
|
|
33
32
|
];
|
|
34
33
|
|
|
35
|
-
// console.log( `You're going to need at least ${ pizzas } pizzas!` );
|
|
36
|
-
|
|
37
34
|
console.log( chalk.green( boxen( output.join( " " ), boxenOptions ) ) );
|
package/eslint.config.js
ADDED
package/package.json
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pizza-for",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"scripts": {},
|
|
7
8
|
"keywords": [],
|
|
8
9
|
"author": "David Neal <david@reverentgeek.com> (https://reverentgeek.com)",
|
|
9
10
|
"license": "MIT",
|
|
10
11
|
"dependencies": {
|
|
11
|
-
"boxen": "^
|
|
12
|
-
"chalk": "^
|
|
12
|
+
"boxen": "^8.0.1",
|
|
13
|
+
"chalk": "^5.3.0",
|
|
13
14
|
"how-many-pizza": "^1.1.2",
|
|
14
15
|
"yargs": "^17.4.0"
|
|
15
16
|
},
|
|
16
17
|
"devDependencies": {
|
|
17
|
-
"eslint": "^
|
|
18
|
-
"eslint-config-reverentgeek": "^
|
|
18
|
+
"eslint": "^9.14.0",
|
|
19
|
+
"eslint-config-reverentgeek": "^5.1.0"
|
|
19
20
|
},
|
|
20
21
|
"bin": {
|
|
21
22
|
"pizza-for": "./bin/index.js"
|
|
@@ -24,4 +25,4 @@
|
|
|
24
25
|
"type": "git",
|
|
25
26
|
"url": "https://github.com/reverentgeek/pizza-for.git"
|
|
26
27
|
}
|
|
27
|
-
}
|
|
28
|
+
}
|
package/readme.md
CHANGED
|
@@ -14,7 +14,7 @@ A command-line tool for calculating the number of pizzas you're gonna need for y
|
|
|
14
14
|
|
|
15
15
|
## Requirements
|
|
16
16
|
|
|
17
|
-
To use this application, you will need [Node.js](https://nodejs.org/) version
|
|
17
|
+
To use this application, you will need [Node.js](https://nodejs.org/) version 20 or higher.
|
|
18
18
|
|
|
19
19
|
## Installing Locally
|
|
20
20
|
|