Compare commits
No commits in common. "8ba4adf1995f43e898604927d7d6a63a1e118567" and "80912cb6e2e33399010b2f5fd1034fc24f221c44" have entirely different histories.
8ba4adf199
...
80912cb6e2
|
@ -13,7 +13,8 @@ export default function (manifestName: string) {
|
||||||
const mappings: { [path: string]: string } = {};
|
const mappings: { [path: string]: string } = {};
|
||||||
|
|
||||||
return new Transform({
|
return new Transform({
|
||||||
objectMode: true,
|
readableObjectMode: true,
|
||||||
|
writableObjectMode: true,
|
||||||
transform(chunk: File, _, callback) {
|
transform(chunk: File, _, callback) {
|
||||||
const hash = PRODUCTION ? fileHash(chunk.contents as Buffer) : "00000000";
|
const hash = PRODUCTION ? fileHash(chunk.contents as Buffer) : "00000000";
|
||||||
const newName = `${chunk.basename.substring(0, chunk.basename.length - chunk.extname.length)}.${hash.substring(0, 8)}${chunk.extname}`;
|
const newName = `${chunk.basename.substring(0, chunk.basename.length - chunk.extname.length)}.${hash.substring(0, 8)}${chunk.extname}`;
|
||||||
|
|
|
@ -13,11 +13,11 @@ import { PRODUCTION, DEFAULT_DATE } from "../environment.js";
|
||||||
import rehypeExternalLinks from "rehype-external-links";
|
import rehypeExternalLinks from "rehype-external-links";
|
||||||
import visit from "unist-util-visit";
|
import visit from "unist-util-visit";
|
||||||
import { src, dest } from "gulp";
|
import { src, dest } from "gulp";
|
||||||
import renderLayout from "../views/layout.js";
|
import renderLayout from "../../src/layout.js";
|
||||||
import renderArticleLayout from "../views/article.js";
|
import renderArticleLayout from "../../src/article.js";
|
||||||
import renderIndex from "../views/index.js";
|
import renderIndex from "../../src/index.js";
|
||||||
import { renderToStaticMarkup } from "preact-render-to-string";
|
import { renderToStaticMarkup } from "preact-render-to-string";
|
||||||
import { SITE_TITLE, SITE_DESCRIPTION } from "../constants.js";
|
import { SITE_TITLE, SITE_DESCRIPTION } from "../../src/constants.js";
|
||||||
import { JSX } from "preact/jsx-runtime";
|
import { JSX } from "preact/jsx-runtime";
|
||||||
import { reloadAssets } from "../assets.js";
|
import { reloadAssets } from "../assets.js";
|
||||||
|
|
||||||
|
@ -62,7 +62,8 @@ function renderArticle() {
|
||||||
reloadAssets();
|
reloadAssets();
|
||||||
|
|
||||||
return new Transform({
|
return new Transform({
|
||||||
objectMode: true,
|
readableObjectMode: true,
|
||||||
|
writableObjectMode: true,
|
||||||
async transform(file: File, _, callback) {
|
async transform(file: File, _, callback) {
|
||||||
try {
|
try {
|
||||||
const slug = basename(file.path, ".asciidoc");
|
const slug = basename(file.path, ".asciidoc");
|
||||||
|
|
|
@ -13,7 +13,8 @@ const FONT_PRESETS = {
|
||||||
|
|
||||||
function compileFont() {
|
function compileFont() {
|
||||||
return new Transform({
|
return new Transform({
|
||||||
objectMode: true,
|
readableObjectMode: true,
|
||||||
|
writableObjectMode: true,
|
||||||
async transform(chunk: File, _, callback) {
|
async transform(chunk: File, _, callback) {
|
||||||
const [, variant, weight] = /([A-Z][a-z]+)-(\w+)\.ttf$/.exec(chunk.basename);
|
const [, variant, weight] = /([A-Z][a-z]+)-(\w+)\.ttf$/.exec(chunk.basename);
|
||||||
const tmpOutput = tmp.fileSync({ discardDescriptor: true });
|
const tmpOutput = tmp.fileSync({ discardDescriptor: true });
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Document } from "asciidoctor";
|
import { Document } from "asciidoctor";
|
||||||
import { DateTime } from "luxon";
|
import { DateTime } from "luxon";
|
||||||
import { asset } from "../assets.js";
|
import { asset } from "../lib/assets.js";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
article: Document;
|
article: Document;
|
|
@ -1,6 +1,6 @@
|
||||||
import { Document } from "asciidoctor";
|
import { Document } from "asciidoctor";
|
||||||
import { DateTime } from "luxon";
|
import { DateTime } from "luxon";
|
||||||
import { asset } from "../assets.js";
|
import { asset } from "../lib/assets.js";
|
||||||
|
|
||||||
const Header = () => (
|
const Header = () => (
|
||||||
<header class="index-header">
|
<header class="index-header">
|
|
@ -1,6 +1,6 @@
|
||||||
import { SITE_DEFAULT_META, SITE_TITLE } from "../constants.js";
|
import { SITE_DEFAULT_META, SITE_TITLE } from "./constants.js";
|
||||||
import { JSX } from "preact/jsx-runtime";
|
import { JSX } from "preact/jsx-runtime";
|
||||||
import { asset } from "../assets.js";
|
import { asset } from "../lib/assets.js";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
title?: string;
|
title?: string;
|
Loading…
Reference in New Issue
Block a user