Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
mono repo init (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
intergalacticspacehighway authored Feb 4, 2021
1 parent 363d6dc commit 12799f8
Show file tree
Hide file tree
Showing 133 changed files with 13,566 additions and 18,558 deletions.
4 changes: 4 additions & 0 deletions example/.expo-shared/assets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true,
"40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true
}
2 changes: 2 additions & 0 deletions example/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//@ts-ignore
export { default } from "./storybook";
36 changes: 23 additions & 13 deletions example/app.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
{
"name": "react-native-aria-example",
"displayName": "Aria Example",
"expo": {
"name": "react-native-aria-example",
"slug": "react-native-aria-example",
"description": "Example app for react-native-aria",
"privacy": "public",
"name": "example",
"slug": "example",
"version": "1.0.0",
"platforms": [
"ios",
"android",
"web"
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"assetBundlePatterns": [
"**/*"
]
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
}
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
Binary file added example/assets/adaptive-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/assets/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 12 additions & 9 deletions example/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
const path = require('path');
const pak = require('../package.json');
const path = require("path");

const packagesPath = path.join(__dirname, "..", "packages");

const alias = {
"^@react-native-aria/(.+)": `${packagesPath}/\\1`,
"react-native-aria": `${packagesPath}/react-native-aria`,
};

module.exports = function (api) {
api.cache(true);

return {
presets: ['babel-preset-expo'],
presets: ["babel-preset-expo"],
plugins: [
[
'module-resolver',
"module-resolver",
{
alias: {
// For development, we want to alias the library to the source
[pak.name]: path.join(__dirname, '..', pak.source),
},
// For development, we want to alias the library to the source
alias,
},
],
],
Expand Down
8 changes: 0 additions & 8 deletions example/index.js

This file was deleted.

36 changes: 2 additions & 34 deletions example/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,8 @@
const path = require('path');
const blacklist = require('metro-config/src/defaults/blacklist');
const escape = require('escape-string-regexp');
const pak = require('../package.json');
const path = require("path");

const root = path.resolve(__dirname, '..');

const modules = Object.keys({
...pak.peerDependencies,
});
const root = path.resolve(__dirname, "..");

module.exports = {
projectRoot: __dirname,
watchFolders: [root],

// We need to make sure that only one version is loaded for peerDependencies
// So we blacklist them at the root, and alias them to the versions in example's node_modules
resolver: {
blacklistRE: blacklist(
modules.map(
(m) =>
new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
)
),

extraNodeModules: modules.reduce((acc, name) => {
acc[name] = path.join(__dirname, 'node_modules', name);
return acc;
}, {}),
},

transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
};
32 changes: 11 additions & 21 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
{
"name": "react-native-aria-example",
"description": "Example app for react-native-aria",
"version": "0.0.1",
"private": true,
"main": "index",
"name": "example",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"move-react-to-outer-node-modules": "cp -r node_modules ../node_modules",
"web": "expo start --web",
"start": "expo start",
"test": "jest"
"eject": "expo eject",
"storybook": "start-storybook -p 7007",
"build-storybook": "build-storybook"
},
"dependencies": {
"expo": "^38.0.0",
"expo-splash-screen": "^0.3.1",
"react": "16.11.0",
"react-dom": "16.11.0",
"react-native": "0.62.2",
"react-native-unimodules": "~0.10.1",
"react-native-web": "^0.12.3"
"@react-aria/visually-hidden": "^3.2.1",
"expo": "~40.0.0",
"expo-status-bar": "~1.0.3"
},
"devDependencies": {
"@babel/core": "^7.9.6",
"@babel/runtime": "^7.9.6",
"babel-plugin-module-resolver": "^4.0.0",
"babel-preset-expo": "^8.2.3",
"expo-cli": "^3.21.12"
}
"private": true
}
77 changes: 0 additions & 77 deletions example/src/App.tsx

This file was deleted.

88 changes: 0 additions & 88 deletions example/src/components/button/Button.tsx

This file was deleted.

32 changes: 0 additions & 32 deletions example/src/components/button/ToggleButton.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions example/src/components/button/index.tsx

This file was deleted.

Loading

0 comments on commit 12799f8

Please sign in to comment.