Skip to content

Commit 50a05fc

Browse files
committed
feat: ignore example dir
1 parent 2e500f8 commit 50a05fc

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/options.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import fs from 'node:fs';
2+
import path from 'node:path';
23
import { getPackages } from '@manypkg/get-packages';
34
import chalk from 'chalk';
45
import inquirer from 'inquirer';
@@ -106,7 +107,14 @@ async function findPackages(opts: ReleaseOptions) {
106107
throw new Error('No root package found.');
107108
}
108109
// ignore private
109-
const packages = _packages.filter(s => !s.packageJson.private);
110+
111+
const packages = _packages.filter(s => {
112+
if (s.packageJson.private) {
113+
return false;
114+
}
115+
const dirname = path.dirname(s.relativeDir);
116+
return !['example', 'examples'].includes(dirname);
117+
});
110118

111119
let isMonorepo = false;
112120
if (packages.length === 0) {

0 commit comments

Comments
 (0)