Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Commit 7d37f15

Browse files
author
Daniel K
committed
Use minimist for parsing patterns
1 parent 476d31d commit 7d37f15

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/xstate-compiled/src/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
#!/usr/bin/env node
22

33
import chokidar from 'chokidar';
4-
import allSettled from 'promise.allsettled';
54
import fs from 'fs';
65
import path from 'path';
76
import minimist from 'minimist';
87
import { introspectMachine } from './introspectMachine';
98
import { extractMachines } from './extractMachines';
109
import { printToFile, printJsFiles } from './printToFile';
1110

12-
const { _: arrayArgs, ...objectArgs } = minimist(process.argv.slice(2));
11+
const { _: patterns, ...objectArgs } = minimist(process.argv.slice(2));
1312
const onlyOnce = objectArgs.once;
1413

15-
const [, , ...patterns] = process.argv;
16-
1714
if (patterns.length === 0) {
1815
console.log(
1916
'You must pass at least one glob, for instance "**/src/**.machine.ts"',

0 commit comments

Comments
 (0)