Upgrades!
This commit is contained in:
parent
1fd581bbf0
commit
25149c8bbd
20 changed files with 52 additions and 43 deletions
|
@ -11,8 +11,8 @@ import ssr from "choo-ssr";
|
||||||
|
|
||||||
// U T I L S
|
// U T I L S
|
||||||
|
|
||||||
import head from "./components/head";
|
import head from "@component/head";
|
||||||
import wrapper from "./components/wrapper";
|
import wrapper from "@component/wrapper";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// U T I L
|
// U T I L
|
||||||
|
|
||||||
import markdown from "../markdown";
|
import markdown from "@component/markdown";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// U T I L
|
// U T I L
|
||||||
|
|
||||||
import markdown from "../markdown";
|
import markdown from "@component/markdown";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// U T I L
|
// U T I L
|
||||||
|
|
||||||
import markdown from "../markdown";
|
import markdown from "@component/markdown";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// U T I L
|
// U T I L
|
||||||
|
|
||||||
import markdown from "../markdown";
|
import markdown from "@component/markdown";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// U T I L
|
// U T I L
|
||||||
|
|
||||||
import markdown from "../markdown";
|
import markdown from "@component/markdown";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// U T I L
|
// U T I L
|
||||||
|
|
||||||
import markdown from "../markdown";
|
import markdown from "@component/markdown";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// U T I L
|
// U T I L
|
||||||
|
|
||||||
import markdown from "../markdown";
|
import markdown from "@component/markdown";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,14 +2,13 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// I M P O R T S
|
// I M P O R T
|
||||||
|
|
||||||
import html from "choo/html";
|
import html from "choo/html";
|
||||||
import { require as local } from "app-root-path";
|
|
||||||
|
|
||||||
// U T I L
|
// U T I L
|
||||||
|
|
||||||
const config = local("/config");
|
import config from "@root/config";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,18 +2,16 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// I M P O R T S
|
// I M P O R T
|
||||||
|
|
||||||
import html from "choo/html";
|
import html from "choo/html";
|
||||||
import { require as local } from "app-root-path";
|
|
||||||
|
|
||||||
// U T I L S
|
// U T I L S
|
||||||
|
|
||||||
|
import config from "@root/config";
|
||||||
import editLink from "./edit-link";
|
import editLink from "./edit-link";
|
||||||
import emailSubscribe from "./email-subscribe";
|
import emailSubscribe from "./email-subscribe";
|
||||||
|
|
||||||
const config = local("/config");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// E X P O R T
|
// E X P O R T
|
||||||
|
|
|
@ -2,14 +2,13 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// I M P O R T S
|
// I M P O R T
|
||||||
|
|
||||||
import html from "choo/html";
|
import html from "choo/html";
|
||||||
import { require as local } from "app-root-path";
|
|
||||||
|
|
||||||
// U T I L S
|
// U T I L S
|
||||||
|
|
||||||
const config = local("/config");
|
import config from "@root/config";
|
||||||
let title = "";
|
let title = "";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,10 @@ import exists from "fs-exists-sync";
|
||||||
import fm from "front-matter";
|
import fm from "front-matter";
|
||||||
import fs from "graceful-fs";
|
import fs from "graceful-fs";
|
||||||
import html from "choo/html";
|
import html from "choo/html";
|
||||||
|
import markdownAnchor from "markdown-it-anchor";
|
||||||
|
import markdownSup from "@module/markdown-it-sup";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import raw from "choo/html/raw";
|
import raw from "choo/html/raw";
|
||||||
import { require as local } from "app-root-path";
|
|
||||||
|
|
||||||
// U T I L S
|
// U T I L S
|
||||||
|
|
||||||
|
@ -19,8 +20,8 @@ const numberRegex = /^[0-9]/g;
|
||||||
const md = require("markdown-it")({
|
const md = require("markdown-it")({
|
||||||
html: true,
|
html: true,
|
||||||
typographer: true
|
typographer: true
|
||||||
}).use(local("/app/modules/markdown-it-sup"))
|
}).use(markdownSup)
|
||||||
.use(require("markdown-it-anchor"), {
|
.use(markdownAnchor, {
|
||||||
slugify: stringToSlugify => {
|
slugify: stringToSlugify => {
|
||||||
let finalString = stringToSlugify
|
let finalString = stringToSlugify
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
|
|
|
@ -4,16 +4,16 @@
|
||||||
|
|
||||||
// P A C K A G E S
|
// P A C K A G E S
|
||||||
|
|
||||||
const async = require("async");
|
import async from "async";
|
||||||
const color = require("colorette");
|
import color from "colorette";
|
||||||
const local = require("app-root-path").require;
|
import Octokit from "@octokit/rest";
|
||||||
const Octokit = require("@octokit/rest");
|
import redis from "redis";
|
||||||
const redis = require("redis");
|
|
||||||
|
|
||||||
// U T I L S
|
// U T I L S
|
||||||
|
|
||||||
const messageSlack = local("/app/helpers/slack");
|
import messageSlack from "@helper/slack";
|
||||||
const relativeDate = local("/app/modules/relative-date");
|
import relativeDate from "@module/relative-date";
|
||||||
|
|
||||||
let octokit;
|
let octokit;
|
||||||
|
|
||||||
String.prototype.escape = function() {
|
String.prototype.escape = function() {
|
||||||
|
@ -365,7 +365,8 @@ function updateGithubFeed() {
|
||||||
// H E L P E R
|
// H E L P E R
|
||||||
|
|
||||||
function refToBranch(ref) {
|
function refToBranch(ref) {
|
||||||
if (ref) return ref.replace("refs/heads/", "");
|
if (ref)
|
||||||
|
return ref.replace("refs/heads/", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@ import websockets from "@inc/fastify-ws";
|
||||||
// U T I L S
|
// U T I L S
|
||||||
|
|
||||||
import handleSocketMessages from "./sockets";
|
import handleSocketMessages from "./sockets";
|
||||||
import messageSlack from "./helpers/slack";
|
import messageSlack from "@helper/slack";
|
||||||
import redirects from "./data/redirects.json";
|
import redirects from "@data/redirects.json";
|
||||||
|
|
||||||
const server = fastify({
|
const server = fastify({
|
||||||
logger: {
|
logger: {
|
||||||
|
|
|
@ -9,9 +9,9 @@ import html from "choo/html";
|
||||||
|
|
||||||
// U T I L S
|
// U T I L S
|
||||||
|
|
||||||
import fetchMetadata from "./helpers/fetch-metadata";
|
import fetchMetadata from "@helper/fetch-metadata";
|
||||||
import { generateGitHubFeed } from "./helpers/github";
|
import { generateGitHubFeed } from "@helper/github";
|
||||||
import messageSlack from "./helpers/slack";
|
import messageSlack from "@helper/slack";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@ import got from "got";
|
||||||
|
|
||||||
// U T I L S
|
// U T I L S
|
||||||
|
|
||||||
import headerBlockchain from "../components/api/header-blockchain";
|
import headerBlockchain from "@component/api/header-blockchain";
|
||||||
import headerSdk from "../components/api/header-sdk";
|
import headerSdk from "@component/api/header-sdk";
|
||||||
import redirects from "../data/redirects.json";
|
import redirects from "@data/redirects.json";
|
||||||
|
|
||||||
const blockchainApi = "https://cdn.jsdelivr.net/gh/lbryio/lbrycrd@master/contrib/devtools/generated/api_v1.json";
|
const blockchainApi = "https://cdn.jsdelivr.net/gh/lbryio/lbrycrd@master/contrib/devtools/generated/api_v1.json";
|
||||||
const cache = new Map();
|
const cache = new Map();
|
||||||
|
|
|
@ -8,7 +8,7 @@ import html from "choo/html";
|
||||||
|
|
||||||
// U T I L
|
// U T I L
|
||||||
|
|
||||||
import linkGrid from "../components/link-grid";
|
import linkGrid from "@component/link-grid";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import raw from "choo/html/raw";
|
||||||
|
|
||||||
// U T I L S
|
// U T I L S
|
||||||
|
|
||||||
import markdown from "../components/markdown";
|
import markdown from "@component/markdown";
|
||||||
import page404 from "./404";
|
import page404 from "./404";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ export default state => {
|
||||||
state.hideFooter = true;
|
state.hideFooter = true;
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<div style="width: 100%; height: calc(100vh - 67px)"> <!-- 67px = height of nav. this avoids second scrollbar -->
|
<div style="width: 100%; height: calc(100vh - 4rem)">
|
||||||
<iframe id="spec" style="width: 100%; height: 100%;"></iframe>
|
<iframe id="spec" style="width: 100%; height: 100%;"></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
11
package.json
11
package.json
|
@ -1,4 +1,12 @@
|
||||||
{
|
{
|
||||||
|
"_moduleAliases": {
|
||||||
|
"@component": "app/components",
|
||||||
|
"@data": "app/data",
|
||||||
|
"@helper": "app/helpers",
|
||||||
|
"@module": "app/modules",
|
||||||
|
"@root": ".",
|
||||||
|
"@view": "app/views"
|
||||||
|
},
|
||||||
"author": "LBRY Team",
|
"author": "LBRY Team",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/polyfill": "^7.2.5",
|
"@babel/polyfill": "^7.2.5",
|
||||||
|
@ -28,6 +36,7 @@
|
||||||
"fs-exists-sync": "^0.1.0",
|
"fs-exists-sync": "^0.1.0",
|
||||||
"got": "^9.6.0",
|
"got": "^9.6.0",
|
||||||
"graceful-fs": "^4.1.15",
|
"graceful-fs": "^4.1.15",
|
||||||
|
"link-module-alias": "^1.1.6",
|
||||||
"make-promises-safe": "^4.0.0",
|
"make-promises-safe": "^4.0.0",
|
||||||
"markdown-it": "^8.4.2",
|
"markdown-it": "^8.4.2",
|
||||||
"markdown-it-anchor": "^5.0.2",
|
"markdown-it-anchor": "^5.0.2",
|
||||||
|
@ -85,6 +94,8 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"css": "sass --load-path=node_modules --update app/sass:app/dist --style compressed",
|
"css": "sass --load-path=node_modules --update app/sass:app/dist --style compressed",
|
||||||
"format": "eslint '**/*.js' --fix --ignore-pattern '/app/dist/'",
|
"format": "eslint '**/*.js' --fix --ignore-pattern '/app/dist/'",
|
||||||
|
"postinstall": "link-module-alias",
|
||||||
|
"preinstall": "command -v link-module-alias && link-module-alias clean || true",
|
||||||
"start": "npm run css && npm i && NODE_ENV=production node index.js",
|
"start": "npm run css && npm i && NODE_ENV=production node index.js",
|
||||||
"test": "run-s test:*",
|
"test": "run-s test:*",
|
||||||
"test:dependencies": "updates --update ./ --exclude fastify,prismjs",
|
"test:dependencies": "updates --update ./ --exclude fastify,prismjs",
|
||||||
|
|
Loading…
Reference in a new issue