eliminate another partial special case
This commit is contained in:
parent
f352be308b
commit
849d6d3597
2 changed files with 3 additions and 35 deletions
|
@ -1,11 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
|
||||
|
||||
// P A C K A G E
|
||||
|
||||
import Component from "choo/component";
|
||||
|
||||
// V A R I A B L E S
|
||||
|
||||
const APPLICATIONS = require("./ecosystem/module-applications");
|
||||
|
@ -16,13 +10,7 @@ const LIGHTHOUSE = require("./ecosystem/submodule-lighthouse");
|
|||
const REFLECTOR = require("./ecosystem/submodule-reflector");
|
||||
const WALLET = require("./ecosystem/submodule-wallet");
|
||||
|
||||
|
||||
|
||||
// P R O G R A M
|
||||
|
||||
Ecosystem.prototype = Object.create(Component.prototype);
|
||||
|
||||
Ecosystem.prototype.createElement = () => {
|
||||
export default function () {
|
||||
return `
|
||||
<section class="ecosystem">
|
||||
<aside class="ecosystem__submodules">
|
||||
|
@ -43,18 +31,3 @@ Ecosystem.prototype.createElement = () => {
|
|||
</section>
|
||||
`;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// E X P O R T
|
||||
|
||||
module.exports = exports = Ecosystem;
|
||||
|
||||
|
||||
|
||||
// H E L P E R S
|
||||
|
||||
function Ecosystem() {
|
||||
if (!(this instanceof Ecosystem)) return new Ecosystem();
|
||||
Component.call(this);
|
||||
}
|
||||
|
|
|
@ -146,12 +146,7 @@ function partialFinder(markdownBody) {
|
|||
if (fileExistsTest) {
|
||||
const partialFunction = require(path.join(__dirname, "..", `./components/${filename}.js`));
|
||||
|
||||
if (filename === "ecosystem") {
|
||||
const neatPartial = new partialFunction;
|
||||
markdownBody = markdownBody.replace(partial, neatPartial.render());
|
||||
}
|
||||
|
||||
else if (filename === "glossary-toc") markdownBody = markdownBody.replace(partial, partialFunction);
|
||||
if (filename === "glossary-toc") markdownBody = markdownBody.replace(partial, partialFunction);
|
||||
|
||||
else markdownBody = markdownBody.replace(partial, partialFunction.default());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue