mirror of
https://github.com/lwouis/alt-tab-macos.git
synced 2026-05-24 11:20:36 +00:00
79f99bd4f1
closes #351 BREAKING CHANGE: The old preferences panel has been replaced with a brand new one Preferences are now much simpler, full of visual illustrations, and should provide a much better experience. Pick between 3 styles (thumbnails, app-icons, titles), sizes, dark/light themes, high visibility options, and more!
24 lines
891 B
JavaScript
24 lines
891 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
const glob = require('glob');
|
|
const { execFileSync } = require('child_process');
|
|
|
|
const ignoreFilePath = path.join(__dirname, '..', '.swiftformatignore');
|
|
const ignorePatterns = fs.readFileSync(ignoreFilePath, 'utf8')
|
|
.split('\n')
|
|
.map(line => line.trim()) // Remove leading and trailing whitespace
|
|
.filter(line => line && !line.startsWith('#')); // Filter out empty lines and comments
|
|
|
|
const files = glob.sync('**/*.swift', { ignore: ignorePatterns });
|
|
|
|
if (files.length > 0) {
|
|
const commandArgs = process.argv.slice(2).concat(files);
|
|
try {
|
|
execFileSync('swiftformat', commandArgs, { stdio: 'inherit' });
|
|
} catch (error) {
|
|
console.warn('swiftformat did not pass, please execute `npm run format` command to format swift files.');
|
|
}
|
|
} else {
|
|
console.log('No Swift files to format.');
|
|
}
|