Skip to content

Commit 9030609

Browse files
committed
add clean script + get build to work
1 parent 1c2f2d3 commit 9030609

File tree

46 files changed

+166
-147
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+166
-147
lines changed

apps/mobile/app/(tabs)/components/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ export default function ComponentsScreen() {
1717

1818
const data = !search
1919
? COMPONENTS
20-
: COMPONENTS.filter((item) =>
21-
item.toLowerCase().includes(search.toLowerCase())
22-
);
20+
: COMPONENTS.filter((item) => item.toLowerCase().includes(search.toLowerCase()));
2321
return (
2422
<View className='flex-1 px-4'>
2523
<View className='py-4'>

apps/mobile/app/(tabs)/components/primitives.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ export default function PrimitivesScreen() {
1515

1616
const data = !search
1717
? PRIMITIVES
18-
: PRIMITIVES.filter((item) =>
19-
item.toLowerCase().includes(search.toLowerCase())
20-
);
18+
: PRIMITIVES.filter((item) => item.toLowerCase().includes(search.toLowerCase()));
2119
return (
2220
<View className='flex-1 px-4'>
2321
<View className='py-4'>

apps/mobile/babel.config.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
module.exports = {
2-
presets: [
3-
['babel-preset-expo', { jsxImportSource: 'nativewind' }],
4-
'nativewind/babel',
5-
],
2+
presets: [['babel-preset-expo', { jsxImportSource: 'nativewind' }], 'nativewind/babel'],
63
};

apps/mobile/metro.config.js

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,22 @@
1-
// Learn more https://docs.expo.io/guides/customizing-metro
21
const { getDefaultConfig } = require('expo/metro-config');
32
const { withNativeWind } = require('nativewind/metro');
4-
const { FileStore } = require('metro-cache');
53
const path = require('path');
64

75
// Find the project and workspace directories
86
const projectRoot = __dirname;
97
// This can be replaced with `find-yarn-workspace-root`
108
const monorepoRoot = path.resolve(projectRoot, '../..');
119

12-
/** @type {import('expo/metro-config').MetroConfig} */
13-
const config = getDefaultConfig(__dirname, {
14-
// [Web-only]: Enables CSS support in Metro.
15-
isCSSEnabled: true,
16-
});
10+
const config = getDefaultConfig(projectRoot);
1711

18-
// #1 - Watch all files in the monorepo
12+
// 1. Watch all files within the monorepo
1913
config.watchFolders = [monorepoRoot];
20-
// #3 - Force resolving nested modules to the folders below
21-
config.resolver.disableHierarchicalLookup = true;
22-
// #2 - Try resolving with project modules first, then workspace modules
14+
// 2. Let Metro know where to resolve packages and in what order
2315
config.resolver.nodeModulesPaths = [
2416
path.resolve(projectRoot, 'node_modules'),
2517
path.resolve(monorepoRoot, 'node_modules'),
2618
];
2719

28-
// Use turborepo to restore the cache when possible
29-
config.cacheStores = [
30-
new FileStore({ root: path.join(projectRoot, 'node_modules', '.cache', 'metro') }),
31-
];
32-
3320
const { resolver } = config;
3421
config.resolver = {
3522
...resolver,

apps/mobile/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"name": "react-native-reusables",
3-
"main": "index.js",
3+
"main": "expo-router/entry",
44
"version": "1.0.0",
55
"scripts": {
66
"start": "EXPO_USE_METRO_WORKSPACE_ROOT=1 expo start -c",
77
"android": "EXPO_USE_METRO_WORKSPACE_ROOT=1 expo start -c --android",
88
"dev": "EXPO_USE_METRO_WORKSPACE_ROOT=1 expo start -c --ios",
9-
"web": "EXPO_USE_METRO_WORKSPACE_ROOT=1 expo start -c --web"
9+
"dev:web": "EXPO_USE_METRO_WORKSPACE_ROOT=1 expo start -c --web",
10+
"clean": "rm -rf .expo node_modules"
1011
},
1112
"dependencies": {
1213
"@rnr/ui": "*",

package-lock.json

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
"scripts": {
99
"dev": "turbo dev",
1010
"dev:mobile": "turbo dev --filter=\"{./apps/mobile}...\" --concurrency 50",
11+
"dev:mobile:web": "turbo build && turbo dev:web --filter=\"{./apps/mobile}...\" --concurrency 32",
1112
"dev:docs": "turbo dev --filter=\"{./apps/docs}...\"",
1213
"lint": "turbo lint",
1314
"test": "turbo test",
1415
"build": "turbo build",
1516
"build:mobile": "turbo build --filter=\"...{./apps/mobile}\"",
16-
"build:docs": "turbo build --filter=\"...{./apps/docs}\""
17+
"build:docs": "turbo build --filter=\"...{./apps/docs}\"",
18+
"clean": "rm -rf .turbo node_modules && turbo clean"
1719
},
1820
"devDependencies": {
1921
"turbo": "^1.12.4",

packages/accordion/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"dev": "tsup --watch --silent",
1616
"lint": "eslint --ext js,ts,tsx .",
1717
"test": "jest",
18-
"build": "tsup --clean"
18+
"build": "tsup --clean",
19+
"clean": "rm -rf .turbo build"
1920
},
2021
"dependencies": {
2122
"@radix-ui/react-accordion": "^1.1.2",

packages/accordion/src/types.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@ type AccordionRootProps = AccordionContext & {
2828
orientation?: 'vertical' | 'horizontal';
2929
};
3030

31-
interface ItemProps {
31+
type AccordionItemProps = {
3232
value: string;
3333
disabled?: boolean;
34-
}
35-
36-
type AccordionItemProps = ItemProps;
34+
};
3735
type AccordionContentProps = ForceMountable;
3836

3937
export type { AccordionContentProps, AccordionContext, AccordionItemProps, AccordionRootProps };

packages/alert-dialog/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"dev": "tsup --watch --silent",
1616
"lint": "eslint --ext js,ts,tsx .",
1717
"test": "jest",
18-
"build": "tsup --clean"
18+
"build": "tsup --clean",
19+
"clean": "rm -rf .turbo build"
1920
},
2021
"dependencies": {
2122
"@radix-ui/react-alert-dialog": "^1.0.5",

0 commit comments

Comments
 (0)