-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: Node.js 12.20+ is required and CommonJS is unsupported
- Loading branch information
1 parent
6afdb1d
commit f7271d6
Showing
16 changed files
with
128 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
#!/usr/bin/env node | ||
const yargs = require("yargs"); | ||
import yargs from "yargs"; | ||
import { hideBin } from "yargs/helpers"; // eslint-disable-line sort-imports | ||
|
||
function cli() { | ||
// eslint-disable-next-line no-unused-expressions | ||
yargs | ||
export default async function cli() { | ||
yargs(hideBin(process.argv)) // eslint-disable-line no-unused-expressions | ||
.usage("$0 <command>") | ||
.command(require("./init")) | ||
.command(await import("./init.js")) // eslint-disable-line node/no-unsupported-features/es-syntax | ||
.demandCommand(1) | ||
.strict() | ||
.alias("help", "h") | ||
.alias("version", "v").argv; | ||
} | ||
|
||
cli(); | ||
|
||
module.exports = cli; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
const { init } = require("./init"); | ||
|
||
module.exports.init = init; | ||
export { init } from "./init.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
const { EOL } = require("os"); | ||
import { EOL } from "os"; | ||
|
||
/** @type {import("../types/ybiq").Logger} */ | ||
module.exports.defaultLogger = (msg) => { | ||
export const defaultLogger = (msg) => { | ||
process.stdout.write(`${msg}${EOL}`); | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { readFileSync } from "fs"; | ||
|
||
export const pkg = JSON.parse(readFileSync(new URL("../../package.json", import.meta.url))); |
Oops, something went wrong.