Skip to content

Commit

Permalink
fix: update dev tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickleet committed Apr 19, 2021
1 parent 5bd5678 commit 41c4e7b
Show file tree
Hide file tree
Showing 6 changed files with 2,372 additions and 5,236 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx pretty-quick --staged
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ const loop = require('loop');
const path = require('path');
const util = require('util');

module.exports = function(command) {
module.exports = function (command) {
const meta = getMetaFile({ confirmInMetaRepo: true });
if (!meta) return;

const projects = meta.projects;
const folders = Object.keys(projects).map(folder => {
const folders = Object.keys(projects).map((folder) => {
return path.resolve(folder);
});

Expand All @@ -22,7 +22,7 @@ module.exports = function(command) {
folders.unshift(process.cwd());

// remove loop flags, and let loop pick them up from process.env
['--exclude', '--exclude-only', '--include', '--include-only', '--parallel'].forEach(flag => {
['--exclude', '--exclude-only', '--include', '--include-only', '--parallel'].forEach((flag) => {
const flagIndex = command.indexOf(flag);
if (flagIndex > -1) {
command = command.substring(0, flagIndex);
Expand All @@ -37,6 +37,6 @@ module.exports = function(command) {
});
};

module.exports.register = program => {
module.exports.register = (program) => {
program.command('exec', 'execute a command against meta repo and child repo dirs').alias('loop');
};
Loading

0 comments on commit 41c4e7b

Please sign in to comment.