refactor: traits hook

This commit is contained in:
cha0s 2021-02-16 00:04:18 -06:00
parent dc8e5202b2
commit b10bc5b57d
11 changed files with 14 additions and 11 deletions

View File

@ -15,7 +15,7 @@ export default {
'@avocado/behavior/compilers': compilers,
'@avocado/behavior/globals': globals,
'@avocado/behavior/types': types,
'@avocado/traits': gatherWithLatus(
'@avocado/traits/traits': gatherWithLatus(
require.context('./traits', false, /\.js$/),
),
'@latus/core/starting': async (latus) => {

View File

@ -5,7 +5,7 @@ import dialogFunctions from './dialog-functions';
export default {
hooks: {
'@avocado/dialog/functions': dialogFunctions,
'@avocado/traits': gatherWithLatus(
'@avocado/traits/traits': gatherWithLatus(
require.context('./traits', false, /\.js$/),
),
},

View File

@ -7,7 +7,7 @@ import wordize from './wordize';
export default {
hooks: {
'@avocado/dialog/functions': dialogFunctions,
'@avocado/traits': gatherWithLatus(
'@avocado/traits/traits': gatherWithLatus(
require.context('./traits', false, /\.js$/),
),
'@latus/core/starting': (latus) => {

View File

@ -10,7 +10,7 @@ export default {
'@avocado/resource/resources': gatherWithLatus(
require.context('./resources', false, /\.js$/),
),
'@avocado/traits': gatherWithLatus(
'@avocado/traits/traits': gatherWithLatus(
require.context('./traits', false, /\.js$/),
),
'@latus/socket/packets': gatherWithLatus(

View File

@ -29,7 +29,7 @@ export default {
'@avocado/resource/resources': gatherWithLatus(
require.context('./resources', false, /\.js$/),
),
'@avocado/traits': gatherWithLatus(
'@avocado/traits/traits': gatherWithLatus(
require.context('./traits', false, /\.js$/),
),
'@latus/socket/packets': gatherWithLatus(

View File

@ -10,7 +10,7 @@ const debug = D('@avocado/input');
export default {
hooks: {
'@avocado/traits': gatherWithLatus(
'@avocado/traits/traits': gatherWithLatus(
require.context('./traits', false, /\.js$/),
),
'@latus/core/config': () => ({

View File

@ -11,7 +11,7 @@ export {default as ShapeView} from './shape/view';
export default {
hooks: {
'@avocado/traits': gatherWithLatus(
'@avocado/traits/traits': gatherWithLatus(
require.context('./traits', false, /\.js$/),
),
'@avocado/resource/resources.decorate': decorateWithLatus(

View File

@ -5,7 +5,7 @@ export default {
'@avocado/resource/resources': gatherWithLatus(
require.context('./resources', false, /\.js$/),
),
'@avocado/traits': gatherWithLatus(
'@avocado/traits/traits': gatherWithLatus(
require.context('./traits', false, /\.js$/),
),
'@latus/socket/packets': gatherWithLatus(

View File

@ -28,7 +28,7 @@ export default {
'@avocado/resource/resources.decorate': decorateWithLatus(
require.context('./resources/decorators', false, /\.js$/),
),
'@avocado/traits': gatherWithLatus(
'@avocado/traits/traits': gatherWithLatus(
require.context('./traits', false, /\.js$/),
),
'@latus/socket/packets': gatherWithLatus(

View File

@ -10,7 +10,7 @@ export default {
'@avocado/resource/resources': gatherWithLatus(
require.context('./resources', false, /\.js$/),
),
'@avocado/traits': gatherWithLatus(
'@avocado/traits/traits': gatherWithLatus(
require.context('./traits', false, /\.js$/),
),
'@latus/socket/packets': gatherWithLatus(

View File

@ -5,11 +5,14 @@ export {default as StateProperty} from './state-property';
export default {
hooks: {
'@latus/core/config': () => ({
'traits.decorate': ['...'],
}),
'@latus/core/starting': (latus) => {
latus.set('%traits', gather(
latus,
{
type: '@avocado/traits',
type: '@avocado/traits/traits',
},
));
},