-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updates dependencies and refactors source to ESM
- Loading branch information
1 parent
bb34982
commit 3878dcb
Showing
23 changed files
with
2,507 additions
and
2,993 deletions.
There are no files selected for viewing
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,22 @@ | ||
#!/usr/bin/env node | ||
"use strict"; | ||
import { execute } from "../src/cli.js"; | ||
import yargs from "yargs/yargs"; | ||
import { hideBin } from "yargs/helpers"; | ||
|
||
const yargs = require( "yargs" ); | ||
const cli = require( "../src/cli" ); | ||
const defaultPort = 8989; | ||
|
||
const options = yargs | ||
const config = yargs( hideBin( process.argv ) ) | ||
.usage( "Usage: $0 -f path/to/chordpro [-o path/to/file-or-folder]" ) | ||
.option( "f", { alias: "source", describe: "Path to file or folder of chordpro files to convert", type: "string", require: true } ) | ||
.option( "o", { alias: "out", describe: "Path to destination file. If none specified, the file will be saved in the same path as the chordpro file.", type: "string" } ) | ||
.option( "temp", { describe: "Specify path to temp folder for generating intermediate files.", type: "string" } ) | ||
.option( "html", { describe: "Save as HTML instead of PDF", type: "boolean" } ) | ||
.option( "columns", { describe: "Use two-column format", type: "boolean" } ); | ||
// .option( "wk", { describe: "Use wkhtmltopdf utility to convert to PDF (must be in your path)", type: "boolean" } ); | ||
|
||
const config = options.argv; | ||
.option( "columns", { describe: "Use two-column format", type: "boolean" } ) | ||
.parse(); | ||
|
||
if ( isNaN( config.port ) ) { | ||
config.port = defaultPort; | ||
config.p = defaultPort; | ||
} | ||
|
||
cli.execute( config ) | ||
console.log( config ); | ||
execute( config ) | ||
.then( () => console.log( "finished" ) ) | ||
.catch( err => { | ||
// options.showHelp(); | ||
console.log( err.message ); | ||
} ); | ||
|
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,12 @@ | ||
import rg from "eslint-config-reverentgeek"; | ||
|
||
export default [ | ||
...rg.configs[ "node-esm" ], | ||
{ | ||
rules: { | ||
"n/no-unpublished-import": [ "error", { | ||
allowModules: [ "eslint-config-reverentgeek" ] | ||
} ] | ||
} | ||
} | ||
]; |
Oops, something went wrong.