Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexagon committed Mar 20, 2024
1 parent 2e7216d commit 9ec42ef
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 33 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/jsr.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
name: Publish to jsr
name: Publish to jsr.io
on:
release:
types: [released]

workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4

- name: Publish package
run: npx jsr publish
uses: cross-org/workflows/.github/workflows/jsr-publish.yml@main
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cross/utils",
"version": "0.6.1",
"version": "0.6.2",
"exports": {
".": "./mod.ts",
"./ansi": "./utils/ansi.ts",
Expand Down
17 changes: 7 additions & 10 deletions utils/ansi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ const enum AnsiCodes {
BgWhite = "\x1b[47m",
}

/**
* Contains methods for applying various ANSI text styles to console output.
*/
/**
* Contains methods for applying various ANSI text styles to console output.
*/
export class Colors {

/**
* Applies bold formatting to text.
* @param {string} text The text to format.
Expand Down Expand Up @@ -260,13 +259,11 @@ export class Colors {
return AnsiCodes.FgWhite + text + AnsiCodes.Reset;
}
}
/**
* Contains methods for controlling cursor behavior in the console, like movement, visibility,
* or clearing the screen.
*/
/**
* Contains methods for controlling cursor behavior in the console, like movement, visibility,
* or clearing the screen.
*/
export class Cursor {


/**
* Moves the cursor up a specified number of lines.
* @param {number} lines The number of lines to move up (default: 1).
Expand Down
16 changes: 8 additions & 8 deletions utils/args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ export function args(all: boolean = false): string[] {

/**
* Provides command-line argument parsing functionality.
*
*
* **Key Features:**
* * Handles short and long flags (e.g., `-f` and `--flag`)
* * Supports multiple values for a single flag
* * Stores loose arguments (those not associated with flags)
* * Stores loose arguments (those not associated with flags)
* * Collects a "rest command" portion after the `--` delimiter, useful for subcommands.
*/
export class ArgsParser {
Expand Down Expand Up @@ -115,17 +115,17 @@ export class ArgsParser {

/**
* Constructs a new instance of the ArgsParser class, parsing provided command-line arguments.
*
* @param {string[]} cmdArgs - An array of command-line arguments to parse.
*
* @param {string[]} cmdArgs - An array of command-line arguments to parse.
*
* @example
* // Basic usage
* const argsParser = new ArgsParser(process.argv.slice(2));
* const inputFile = argsParser.get('input');
* const argsParser = new ArgsParser(process.argv.slice(2));
* const inputFile = argsParser.get('input');
*
* // Handling flags, multiple values, and loose arguments
* const options = argsParser.getArray('option');
* const isVerbose = argsParser.get('verbose');
* const options = argsParser.getArray('option');
* const isVerbose = argsParser.get('verbose');
* const looseArgs = argsParser.getLoose();
*/
constructor(cmdArgs: string[]) {
Expand Down
1 change: 0 additions & 1 deletion utils/spawn.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { CurrentRuntime, Runtime } from "@cross/runtime";


// Runtime-specific execution functions (also using async/await)
async function spawnNodeChildProcess(
command: string[],
Expand Down

0 comments on commit 9ec42ef

Please sign in to comment.