refactor: autoreg

This commit is contained in:
cha0s 2020-06-20 19:54:41 -05:00
parent 87d138e8c0
commit 5f701f1525
4 changed files with 10 additions and 35 deletions

View File

@ -1,11 +1,5 @@
function traitComponents(scwp) { module.exports = function traitComponents(scwp) {
if (process.env.SIDE && 'client' === process.env.SIDE.toLowerCase()) { if (process.env.SIDE && 'client' === process.env.SIDE.toLowerCase()) {
scwp.enterSelf(); scwp.autoreg('trait-component');
scwp.loadSelf('scwp/autoreg', {
paths: scwp.paths,
root: scwp.root,
type: 'trait-component',
});
} }
} };
module.exports = traitComponents;

View File

@ -1,9 +1,3 @@
function traits(scwp) { module.exports = function traits(scwp) {
scwp.enterSelf(); scwp.autoreg('trait');
scwp.loadSelf('scwp/autoreg', { };
paths: scwp.paths,
root: scwp.root,
type: 'trait',
});
}
module.exports = traits;

View File

@ -1,8 +1,3 @@
module.exports = (scwp) => { module.exports = (scwp) => {
scwp.enterSelf(); scwp.autoreg('packet');
scwp.loadSelf('scwp/autoreg', {
paths: scwp.paths,
root: scwp.root,
type: 'packet',
});
}; };

View File

@ -1,11 +1,3 @@
const {join} = require('path'); module.exports = function s13n(scwp) {
scwp.autoreg('synchronized');
function s13n(scwp) { };
scwp.enterSelf();
scwp.loadSelf('scwp/autoreg', {
paths: scwp.paths,
root: scwp.root,
type: 'synchronized',
});
}
module.exports = s13n;