refactor: react-redux and aliases
This commit is contained in:
parent
ab39d74d64
commit
fb98053c8d
|
@ -1 +1 @@
|
|||
exports.dependencies = ['@flecks/react'];
|
||||
exports.dependencies = ['@flecks/react-redux'];
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
"@babel/parser": "^7.13.13",
|
||||
"@flecks/core": "^3.0.0",
|
||||
"@flecks/react": "^3.0.0",
|
||||
"@flecks/redux": "^3.0.0",
|
||||
"@flecks/react-redux": "^3.0.0",
|
||||
"babeler": "^1.0.0",
|
||||
"lodash.get": "^4.4.2",
|
||||
"lodash.set": "^4.3.2",
|
||||
|
|
|
@ -5,14 +5,14 @@ import {
|
|||
React,
|
||||
useContext,
|
||||
} from '@flecks/react';
|
||||
import {useDispatch} from '@flecks/redux';
|
||||
import {useDispatch} from '@flecks/react-redux';
|
||||
|
||||
import locals from './component.module.scss';
|
||||
|
||||
const ScriptComponent = ({
|
||||
function ScriptComponent({
|
||||
path,
|
||||
resource,
|
||||
}) => {
|
||||
}) {
|
||||
const dispatch = useDispatch();
|
||||
const {uri, uuid} = useContext(Context);
|
||||
return (
|
||||
|
@ -26,7 +26,7 @@ const ScriptComponent = ({
|
|||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
ScriptComponent.defaultProps = {
|
||||
path: '/',
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
module.exports = async (env, argv, flecks) => {
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies, global-require
|
||||
const config = await require('@flecks/fleck/build/fleck.webpack.config')(env, argv, flecks);
|
||||
config.module.rules.push({
|
||||
test: /\.(frag|glsl|vert)$/,
|
||||
use: ['webpack-glsl-loader'],
|
||||
});
|
||||
return config;
|
||||
};
|
|
@ -1,4 +1,4 @@
|
|||
export const hooks = {
|
||||
exports.hooks = {
|
||||
'@flecks/build.config': (target, config) => {
|
||||
config.module.rules.push({
|
||||
test: /\.(frag|glsl|vert)$/,
|
|
@ -9,8 +9,7 @@
|
|||
"test": "flecks test"
|
||||
},
|
||||
"files": [
|
||||
"client.js",
|
||||
"server.js"
|
||||
"client.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"@flecks/core": "^3.0.0",
|
||||
|
|
|
@ -2,6 +2,6 @@ exports.dependencies = ['@flecks/react'];
|
|||
|
||||
exports.stubs = {
|
||||
server: [
|
||||
/^@pixi/,
|
||||
'@pixi',
|
||||
],
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
exports.stubs = {
|
||||
server: [
|
||||
/^gamepads/,
|
||||
'gamepads',
|
||||
],
|
||||
};
|
||||
|
|
|
@ -24,5 +24,5 @@ export const hooks = {
|
|||
Input: InputPacket,
|
||||
TraitInteractive,
|
||||
}),
|
||||
'@flecks/web.config': (flecks) => flecks.get('@avocado/input.actions'),
|
||||
'@flecks/web.config': (req, flecks) => flecks.get('@avocado/input'),
|
||||
};
|
||||
|
|
|
@ -2,6 +2,6 @@ exports.dependencies = ['@flecks/react'];
|
|||
|
||||
exports.stubs = {
|
||||
server: [
|
||||
/^ace-builds/,
|
||||
'ace-builds',
|
||||
],
|
||||
};
|
||||
|
|
|
@ -1 +1 @@
|
|||
exports.dependencies = ['@flecks/react'];
|
||||
exports.dependencies = ['@flecks/react-redux'];
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
"@avocado/react": "^4.0.0",
|
||||
"@flecks/core": "^3.0.0",
|
||||
"@flecks/react": "^3.0.0",
|
||||
"@flecks/react-redux": "^3.0.0",
|
||||
"@flecks/redux": "^3.0.0",
|
||||
"deepmerge": "^4.2.2",
|
||||
"fast-json-patch": "^3.0.0-1",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {useContext} from '@flecks/react';
|
||||
import {useDispatch} from '@flecks/redux';
|
||||
import {useDispatch} from '@flecks/react-redux';
|
||||
import {compare} from 'fast-json-patch';
|
||||
|
||||
import Context from '../context/json-patcher';
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
"@avocado/traits": "^4.0.0",
|
||||
"@flecks/core": "^3.0.0",
|
||||
"@flecks/react": "^3.0.0",
|
||||
"@flecks/react-redux": "^3.0.0",
|
||||
"@flecks/redux": "^3.0.0",
|
||||
"@flecks/socket": "^3.0.0",
|
||||
"@flecks/web": "^3.0.0",
|
||||
|
|
|
@ -26,17 +26,15 @@ import {
|
|||
usePrevious,
|
||||
useState,
|
||||
} from '@flecks/react';
|
||||
import {
|
||||
useDispatch,
|
||||
} from '@flecks/redux';
|
||||
import {useDispatch} from '@flecks/react-redux';
|
||||
|
||||
import styles from './component.module.scss';
|
||||
|
||||
const renderer = new Renderer();
|
||||
|
||||
const RoomComponent = ({
|
||||
function RoomComponent({
|
||||
resource,
|
||||
}) => {
|
||||
}) {
|
||||
const {uri, uuid} = useContext(Context);
|
||||
const dispatch = useDispatch();
|
||||
const flecks = useFlecks();
|
||||
|
@ -249,7 +247,7 @@ const RoomComponent = ({
|
|||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
RoomComponent.defaultProps = {};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user