Skip to content

Commit a208ca3

Browse files
author
Josh Biddick
committed
Downgrade meow as was enforcing ESM
1 parent bd40c28 commit a208ca3

File tree

4 files changed

+155
-179
lines changed

4 files changed

+155
-179
lines changed

bin/cli.js

Lines changed: 1 addition & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,2 @@
11
#!/usr/bin/env node
2-
"use strict";
3-
4-
const meow = require("meow");
5-
const { VersionFileGenerator } = require("../lib/VersionFileGenerator");
6-
const chalk = require("chalk");
7-
8-
// Command line definition.
9-
const cli = meow(
10-
`
11-
Usage
12-
$ generate-version <package.json> <template.ejs> <output_file.json>
13-
14-
Options
15-
--packageFile, -p Path to package.json file
16-
--template, -t Path to template file
17-
--outputFile, -o Path to output file
18-
19-
Examples
20-
$ generate-version -p ./package.json -t ./templates/version.ejs -o ./build/version.json
21-
`,
22-
{
23-
flags: {
24-
packageFile: {
25-
type: "string",
26-
alias: "p",
27-
},
28-
template: {
29-
type: "string",
30-
alias: "t",
31-
},
32-
outputFile: {
33-
type: "string",
34-
alias: "o",
35-
},
36-
},
37-
}
38-
);
39-
40-
// User inputs read by the terminal
41-
const { packageFile, template, outputFile } = cli.flags;
42-
43-
Promise.resolve()
44-
.then(() =>
45-
generateVersionFile({
46-
packageFile,
47-
template,
48-
outputFile,
49-
})
50-
)
51-
.catch((error) => {
52-
throw new Error(chalk.red(error));
53-
});
54-
55-
/**
56-
* Generate Version File.
57-
*
58-
* This is used to generate a file containing version information,
59-
* based on the information in your NPM package.json.
60-
* This file is used to display the version
61-
* number at the bottom of the app.
62-
*
63-
*/
64-
function generateVersionFile(options) {
65-
const versionFileGenerator = new VersionFileGenerator(options);
66-
versionFileGenerator.generate();
67-
}
2+
require('../lib/start.js')

package-lock.json

Lines changed: 69 additions & 112 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@rushstack/node-core-library": "^3.39.0",
2727
"chalk": "^4.1.1",
2828
"ejs": "^3.1.6",
29-
"meow": "^10.0.1"
29+
"meow": "^9.0.0"
3030
},
3131
"devDependencies": {
3232
"@microsoft/api-documenter": "^7.13.4",

0 commit comments

Comments
 (0)