Skip to content

Commit

Permalink
another trial
Browse files Browse the repository at this point in the history
  • Loading branch information
Aslemammad committed Oct 1, 2024
1 parent 49b4642 commit 047c5e2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,13 @@ const main = defineCommand({
},
run: async ({ args }) => {
console.log('args', args)
const ignoredPaths = ["**/node_modules/**", ".git"]
const paths = args._.length > 0
? await glob(args._, {
expandDirectories: false,
onlyDirectories: true,
absolute: true,
ignore: ["**/node_modules", ".git"],
ignore: ignoredPaths,
})
: [process.cwd()];
console.log('paths', paths)
Expand All @@ -105,7 +106,7 @@ const main = defineCommand({
expandDirectories: false,
onlyDirectories: true,
absolute: true,
ignore: ["**/node_modules", ".git"],
ignore: ignoredPaths,
});

const formData = new FormData();
Expand Down Expand Up @@ -243,7 +244,7 @@ const main = defineCommand({
cwd: templateDir,
dot: true,
onlyFiles: true,
ignore: ["**/node_modules", ".git"], // always ignore node_modules and .git
ignore: ignoredPaths, // always ignore node_modules and .git
});

const filteredFiles = files.filter((file) => !ig.ignores(file));
Expand Down

0 comments on commit 047c5e2

Please sign in to comment.