tacos-for 1.0.1 → 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 CHANGED
@@ -1,9 +1,8 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
-
4
- const yargs = require( "yargs" );
5
- const chalk = require( "chalk" );
6
- const boxen = require( "boxen" );
2
+ import yargs from "yargs/yargs";
3
+ import { hideBin } from "yargs/helpers";
4
+ import chalk from "chalk";
5
+ import boxen from "boxen";
7
6
 
8
7
  const boxenOptions = {
9
8
  padding: 1,
@@ -11,11 +10,11 @@ const boxenOptions = {
11
10
  borderStyle: "round"
12
11
  };
13
12
 
14
- const options = yargs
13
+ const options = yargs( hideBin( process.argv ) )
15
14
  .usage( "$0 <number-of-people> [--tacos-per-person=3]" )
16
15
  .demand( 1 )
17
16
  .default( "tacos-per-person", 3 )
18
- .argv;
17
+ .parse();
19
18
 
20
19
  if ( options._.length === 0 ) {
21
20
  console.log( "number of people eating tacos is required!" );
@@ -0,0 +1,12 @@
1
+ import rg from "eslint-config-reverentgeek";
2
+
3
+ export default [
4
+ ...rg.configs[ "node-esm" ],
5
+ {
6
+ rules: {
7
+ "n/no-unpublished-import": [ "error", {
8
+ allowModules: [ "eslint-config-reverentgeek" ]
9
+ } ]
10
+ }
11
+ }
12
+ ];
package/package.json CHANGED
@@ -1,22 +1,27 @@
1
1
  {
2
- "name": "tacos-for",
3
- "version": "1.0.1",
4
- "description": "",
5
- "main": "bin/index.js",
6
- "scripts": {},
7
- "keywords": [],
8
- "author": "David Neal <david@reverentgeek.com> (https://reverentgeek.com)",
9
- "license": "MIT",
10
- "dependencies": {
11
- "boxen": "^4.2.0",
12
- "chalk": "^4.1.0",
13
- "yargs": "^15.4.1"
14
- },
15
- "devDependencies": {
16
- "eslint": "^7.6.0",
17
- "eslint-config-reverentgeek": "^3.0.0"
18
- },
19
- "bin": {
20
- "tacos-for": "./bin/index.js"
21
- }
2
+ "name": "tacos-for",
3
+ "version": "2.0.0",
4
+ "description": "",
5
+ "main": "bin/index.js",
6
+ "type": "module",
7
+ "scripts": {},
8
+ "keywords": [],
9
+ "author": "David Neal <david@reverentgeek.com> (https://reverentgeek.com)",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "boxen": "^8.0.1",
13
+ "chalk": "^5.3.0",
14
+ "yargs": "^17.7.2"
15
+ },
16
+ "devDependencies": {
17
+ "eslint": "^9.14.0",
18
+ "eslint-config-reverentgeek": "^5.1.0"
19
+ },
20
+ "bin": {
21
+ "tacos-for": "./bin/index.js"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "https://github.com/reverentgeek/tacos-for.git"
26
+ }
22
27
  }