Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Feb 13, 2020
1 parent 3f1be96 commit c1b75eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/cli",
"version": "0.1.22",
"version": "0.1.23",
"description": "CLI for the swc project",
"main": "index.js",
"scripts": {
Expand Down
7 changes: 4 additions & 3 deletions src/dir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export default async function({

async function handle(filenameOrDir: string) {
if (!fs.existsSync(filenameOrDir)) return 0;

const stat = fs.statSync(filenameOrDir);

if (stat.isDirectory()) {
Expand All @@ -110,8 +109,10 @@ export default async function({
await Promise.all(
files.map(async (filename: string) => {
const src = path.join(dirname, filename);
const written = await handleFile(src, dirname);
if (written) count += 1;
try {
const written = await handleFile(src, dirname);
if (written) count += 1;
} catch (e) {}
})
);

Expand Down

0 comments on commit c1b75eb

Please sign in to comment.