Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks up dripsy into @dripsy/core and dripsy #74

Merged
merged 9 commits into from
Mar 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
DripsyProvider,
Container,
Theme,
// Pressable,
H4,
} from 'dripsy'
// Import from core
import { H4 } from '@dripsy/core'
import { Text } from 'react-native'

const theme = {
Expand Down
54 changes: 27 additions & 27 deletions examples/example/package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"name": "dripsy-example",
"description": "Example app for expo-theme-ui",
"version": "0.0.1",
"private": true,
"main": "__generated__/AppEntry.js",
"scripts": {
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"start": "expo start",
"test": "jest",
"postinstall": "expo-yarn-workspaces postinstall"
},
"dependencies": {
"expo": "^40.0.0",
"react": "~16.9.0",
"react-dom": "~16.9.0",
"react-native": "~0.61.5",
"react-native-unimodules": "~0.9.0",
"react-native-web": "^0.14.10"
},
"devDependencies": {
"@babel/core": "^7.9.6",
"@babel/runtime": "^7.9.6",
"babel-preset-expo": "~8.1.0",
"expo-cli": "^3.17.18"
}
"name": "dripsy-example",
"description": "Example app for expo-theme-ui",
"version": "0.0.1",
"private": true,
"main": "__generated__/AppEntry.js",
"scripts": {
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"start": "expo start",
"test": "jest",
"postinstall": "expo-yarn-workspaces postinstall"
},
"dependencies": {
"expo": "^40.0.0",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "0.63.4",
"react-native-unimodules": "~0.12.0",
"react-native-web": "~0.14.10"
},
"devDependencies": {
"@babel/core": "^7.9.6",
"@babel/runtime": "^7.9.6",
"babel-preset-expo": "~8.1.0",
"expo-cli": "^3.17.18"
}
}
37 changes: 19 additions & 18 deletions examples/example/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@
/* eslint-disable @typescript-eslint/camelcase */
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');
const fs = require('fs');
const createExpoWebpackConfigAsync = require('@expo/webpack-config');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const path = require('path')
const fs = require('fs')
const createExpoWebpackConfigAsync = require('@expo/webpack-config')
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin')

const node_modules = path.resolve(__dirname, '../..', 'node_modules');
const packages = path.resolve(__dirname, '../..', 'packages');
const node_modules = path.resolve(__dirname, '../..', 'node_modules')
const packages = path.resolve(__dirname, '../..', 'packages')

module.exports = async function (env, argv) {
const config = await createExpoWebpackConfigAsync(env, argv);
const config = await createExpoWebpackConfigAsync(env, argv)

config.context = path.resolve(__dirname, '../..');
config.context = path.resolve(__dirname, '../..')

config.module.rules.push({
test: /\.(js|ts|tsx)$/,
include: /(packages|example)\/.+/,
exclude: /node_modules/,
use: 'babel-loader',
});
})

config.resolve.plugins = config.resolve.plugins.filter(
(p) => !(p instanceof ModuleScopePlugin)
);
)

Object.assign(config.resolve.alias, {
'react': path.resolve(node_modules, 'react'),
react: path.resolve(node_modules, 'react'),
'react-native': path.resolve(node_modules, 'react-native-web'),
'react-native-web': path.resolve(node_modules, 'react-native-web'),
'@expo/vector-icons': path.resolve(node_modules, '@expo/vector-icons'),
});
})

fs.readdirSync(packages)
.filter((name) => !name.startsWith('.'))
.forEach((name) => {
config.resolve.alias[name === 'dripsy' ? 'dripsy' :`@dripsy/${name}`] = path.resolve(
config.resolve.alias[
name === 'dripsy' ? 'dripsy' : `@dripsy/${name}`
] = path.resolve(
packages,
name,
require(`../../packages/${name}/package.json`).source
);
});
)
})

return config;
};
return config
}
Loading