Skip to content

Commit

Permalink
feat: added support for ignore pattern to cli
Browse files Browse the repository at this point in the history
- CR Fixes

resolves keithamus#328
  • Loading branch information
Michał Grzegorzewski committed Nov 23, 2024
1 parent 174d431 commit 7fafc48
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,18 @@ function sortPackageJsonFile(file, reporter, isCheck) {
}

function sortPackageJsonFiles(patterns, { ignore, ...options }) {
performance.mark('start')
const files = globSync(patterns, { ignore })
const reporter = new Reporter(files, options)
const { isCheck } = options

performance.mark('sorting')
for (const file of files) {
try {
sortPackageJsonFile(file, reporter, isCheck)
} catch (error) {
reporter.reportFailed(file, error)
}
}
performance.mark('finish')
reporter.printSummary()
if (process.env.DEBUG) {
console.log([
performance.measure('Glob Search', 'start', 'sorting'),
performance.measure('Sorting', 'sorting', 'finish'),
performance.measure('Total', 'start', 'finish'),
])
}
}

async function sortPackageJsonFromStdin() {
Expand Down

0 comments on commit 7fafc48

Please sign in to comment.