Skip to content

Commit

Permalink
chore(scripts): remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
tido64 committed Oct 4, 2024
1 parent 4b6ba94 commit e6b6d2b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .changeset/little-impalas-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
3 changes: 1 addition & 2 deletions scripts/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ import { updateApiReadme } from "./commands/updateApiReadme.js";
*/
function init(commands) {
const parser = yargs(process.argv.slice(2));
Object.keys(commands).forEach((name) => {
const { description, command } = commands[name];
Object.entries(commands).forEach(([name, { description, command }]) => {
parser.command(name, description, {}, async (args) => {
try {
await command(args, process.argv.slice(3));
Expand Down
13 changes: 1 addition & 12 deletions scripts/src/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function workspaceRoot() {
* @param {SpawnOptions=} options
* @returns {Promise<void>}
*/
export function spawn(command, args, options) {
function spawn(command, args, options) {
return new Promise((resolve, reject) => {
/** @type {SpawnOptions} */
const opts = {
Expand Down Expand Up @@ -70,14 +70,3 @@ export function runScript(command, ...args) {
const yarn = os.platform() === "win32" ? "yarn.cmd" : "yarn";
return execute(yarn, command, ...args);
}

/**
* @param {...(() => Promise<void>)} scripts
* @returns {Promise<void>}
*/
export function sequence(...scripts) {
return scripts.reduce(
(result, script) => result.then(() => script()),
Promise.resolve()
);
}
3 changes: 0 additions & 3 deletions scripts/src/require.js

This file was deleted.

0 comments on commit e6b6d2b

Please sign in to comment.