feat: modified setup

This commit is contained in:
yungblud 2023-04-13 16:20:08 +09:00
parent f5dc4992fb
commit 4ddecbf42b
4 changed files with 9 additions and 3 deletions

View File

@ -9,7 +9,7 @@ module.exports = {
{ {
extensions: ['.tsx', '.ts', '.js', '.json'], extensions: ['.tsx', '.ts', '.js', '.json'],
alias: { alias: {
[pak.name]: path.join(__dirname, '..', pak.source), [pak.name]: path.join(__dirname, '../../', pak.source),
}, },
}, },
], ],

View File

@ -3,7 +3,7 @@ const escape = require('escape-string-regexp');
const exclusionList = require('metro-config/src/defaults/exclusionList'); const exclusionList = require('metro-config/src/defaults/exclusionList');
const pak = require('../../package.json'); const pak = require('../../package.json');
const root = path.resolve(__dirname, '..'); const root = path.resolve(__dirname, '../../');
const modules = Object.keys({ const modules = Object.keys({
...pak.peerDependencies, ...pak.peerDependencies,

View File

@ -3,7 +3,9 @@
"extends": "@tsconfig/react-native/tsconfig.json", /* Recommended React Native TSConfig base */ "extends": "@tsconfig/react-native/tsconfig.json", /* Recommended React Native TSConfig base */
"compilerOptions": { "compilerOptions": {
/* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Visit https://aka.ms/tsconfig.json to read more about this file */
"paths": {
"react-native-video": ["../../Video.js"]
},
/* Completeness */ /* Completeness */
"skipLibCheck": true /* Skip type checking all .d.ts files. */ "skipLibCheck": true /* Skip type checking all .d.ts files. */
} }

View File

@ -23,6 +23,10 @@
"keymirror": "^0.1.1", "keymirror": "^0.1.1",
"prop-types": "^15.7.2" "prop-types": "^15.7.2"
}, },
"peerDependencies": {
"react": "*",
"react-native": "*"
},
"scripts": { "scripts": {
"lint": "yarn eslint .", "lint": "yarn eslint .",
"xbasic": "yarn --cwd examples/basic", "xbasic": "yarn --cwd examples/basic",