Skip to content

Commit

Permalink
Chore(web-react): Fix non resolvable modules and types
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Jan 23, 2024
1 parent 90a265d commit 5ff6ccd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 7 additions & 0 deletions packages/web-react/scripts/entryPoints.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
const entryPoints = [
{ dirs: [], bundleName: 'index' },
{ dirs: ['common'] },
{ dirs: ['common', 'constants'] },
{ dirs: ['common', 'utilities'] },
{ dirs: ['constants'] },
{ dirs: ['context'] },
{ dirs: ['hooks'] },
{ dirs: ['types'] },
{ dirs: ['types', 'shared'] },
{ dirs: ['utils'] },
{ dirs: ['components'] },
{ dirs: ['components', 'Accordion'] },
{ dirs: ['components', 'Alert'] },
Expand Down
8 changes: 5 additions & 3 deletions packages/web-react/scripts/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import { glob } from 'glob';
import * as path from 'path';
import * as recast from 'recast';
import * as parser from 'recast/parsers/babel';
import glob = require('glob');

export const distDir = path.resolve(__dirname, '..', 'dist');

export function eachFile(dir: string, callback: (absPath: string, relPath: string) => unknown) {
const promises: Promise<unknown>[] = [];

return new Promise<void>((resolve, reject) => {
glob(`${dir}/**/*.js`, (error, files) => {
// @ts-expect-error -- has no properties in common with type 'GlobOptions'
glob(`${dir}/**/*.js`, (error: Error | null, files: string[]) => {
if (error) return reject(error);

files.sort().forEach((file) => {
files.sort().forEach((file: string) => {
const relPath = path.relative(dir, file);

// Outside the distDir, somehow.
Expand Down

0 comments on commit 5ff6ccd

Please sign in to comment.