Skip to content

Commit

Permalink
Masses of typos and yet more cSpell changes
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-preston committed May 25, 2024
1 parent 9730b47 commit cba0f5c
Show file tree
Hide file tree
Showing 28 changed files with 246 additions and 232 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# cSpell:words Eleventy borales

name: Deploy static content to Pages

on:
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
https://andy-preston.github.io/
# Andy Preston's Curate's Egg

Source code for <https://andy-preston.github.io/>
11 changes: 0 additions & 11 deletions builder/cspell.json

This file was deleted.

6 changes: 3 additions & 3 deletions builder/dom-serializer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict"

// Overcomplicated rigmarole to get `tsx` to import a commonJS module
// If we simply import dom-serializer, it uses the CommonJS version (why?)
// and we end up importing an object with a single property: `default` which
// is a reference to the function we tried to import.

import { require as tsxRequire } from "tsx/cjs/api";

Expand Down
2 changes: 2 additions & 0 deletions builder/eleventy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"use strict";

// cSpell:words syntaxhighlight

import syntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight";
import transforms from "./transforms.ts";
import webCPlugin from "@11ty/eleventy-plugin-webc";
Expand Down
9 changes: 8 additions & 1 deletion builder/tidy-html.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
// cSpell:words quot

import tidy from "./tidy-html.ts";
import { describe, expect, test } from 'vitest'
import { describe, expect, test } from "vitest";

describe("Tidy HTML module", () => {

test("Quotes and ampersands are rendered as entities", () => {
const rawHtml = "<a href=\"plop.html\">\"&\"</a>";
expect(tidy(rawHtml)).toBe("<a href=\"plop.html\">&quot;&amp;&quot;</a>");
});

test("It converts doctype to upper case", () => {
// https://html-validate.org/rules/doctype-style.html
const matcher = /^<!DOCTYPE/g;
Expand Down
3 changes: 3 additions & 0 deletions builder/tidy-html.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// cSpell:words domhandler domutils

import { parseDocument } from "htmlparser2";
import render from "./dom-serializer.ts";
import { Node, isDirective, isTag, isText, hasChildren } from "domhandler";
Expand Down Expand Up @@ -39,6 +41,7 @@ const isNotInline = (node: Node | null): boolean => {
};

const stripUnusedJs = (node: Node): void => {
// This is only needed as long as we're using Eleventy's "chunking"
if (isTag(node) && node.name == "script" && node.attribs.src == "") {
removeElement(node);
}
Expand Down
2 changes: 1 addition & 1 deletion builder/transforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const typescript = (content: string): string => ts.transpileModule(content, {
}).outputText;

export default async (content: string, spec: string): Promise<string> => {
// bundler transform pass in a type, HTML transforms a filename
// bundler transform passes in a type, HTML transform passes a filename
const type = spec.includes(".") ?
path.extname(spec).replace(/^./, "") : spec;
if (type == "js") {
Expand Down
1 change: 1 addition & 0 deletions components/article-index-links.webc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!--- cSpell:words nokeep -->
<script webc:type="js">
if (collection == undefined) {
throw new Error(`*** Section "${section.title}" has no items ***`);
Expand Down
8 changes: 0 additions & 8 deletions components/cspell.json

This file was deleted.

1 change: 1 addition & 0 deletions components/front-introduction.webc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- cSpell:words nokeep -->
<article>
<front-illustration
webc:nokeep
Expand Down
1 change: 1 addition & 0 deletions components/page-body.webc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- cSpell:words nokeep -->
<body webc:nokeep>
<article-header
webc:nokeep
Expand Down
2 changes: 2 additions & 0 deletions components/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* cSpell:words prolog -->
:root {
--column-width: 40em;
--background: #000;
Expand Down
2 changes: 2 additions & 0 deletions docker/yarn
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

# cSpell:words eleventy workdir

case $1 in
'shell')
COMMAND='sh'
Expand Down
1 change: 1 addition & 0 deletions layout/layout.webc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!--- cSpell:words nokeep -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Expand Down
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,22 @@
}
]
},
"cspell": {
"version": "0.2",
"language": "en-gb",
"useGitignore": false,
"words": [
"webc"
],
"overrides": [
{
"filename": "package.json",
"words": [
"stylelint", "prestons", "syntaxhighlight"
]
}
]
},
"stylelint": {
"extends": [
"stylelint-config-standard"
Expand Down
1 change: 1 addition & 0 deletions views/accessing-doctrine-models-as-arrays.webc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# cSpell:words ucfirst Symfony
title: "Accessing Doctrine Models as Arrays"
tags: php
---
Expand Down
1 change: 1 addition & 0 deletions views/agility.webc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# cSpell:words pongy
title: "Agility"
tags: philosophy
date: "2023-05-26"
Expand Down
2 changes: 2 additions & 0 deletions views/blue-pill-black-magic-probe.webc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# cSpell:words blacksphere blackmagic stlink swlink imgur
# cSpell:words JTAG GPIO libnewlib multiarch eabi swdp
title: "Using a Blue Pill as a Black Magic Probe - The Easy Way"
tags: micro
date: "2023-06-26"
Expand Down
3 changes: 2 additions & 1 deletion views/coding-katas-vs-real-life.webc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# cSpell:words culting
title: "Coding Katas Vs Real Life"
tags: engineering
date: "2024-02-18"
Expand Down Expand Up @@ -112,7 +113,7 @@ reading their code, it comes over as leaning a little towards
you need Deliberate Practice. And you can spend that time taking exercises
with no goal beyond development itself or you can find a useful (or, at least,
useful to you) project to complete. But make sure that project has some
challenges that will make your skillset grow.</p>
challenges that will make your skill-set grow.</p>

<p>Be obsessed with software quality and refine your project again and again
until the code isn't just &quot;not bad&quot; but as close to perfect that you
Expand Down
18 changes: 0 additions & 18 deletions views/cspell.json

This file was deleted.

2 changes: 2 additions & 0 deletions views/docker-gui-non-root.webc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# cSpell:words Ghidra blacktop
# cSpell:words DIYLC unzipper noninteractive workdir
title: "Running GUI Apps in Docker as a non root user"
tags: docker
date: "2023-07-11"
Expand Down
4 changes: 3 additions & 1 deletion views/ffmpeg-recipies.webc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# cSpell:words libmp3lame yadif libx264 yuva444p colorchannelmixer
# cSpell:words astats ametadata lavfi
title: "FFMPEG Recipes"
tags: shell
date: "2024-02-18"
Expand Down Expand Up @@ -97,7 +99,7 @@ ffmpeg \
<section>
<article><p>Split into chunks each starting on a keyframe</p></article>
<aside><pre><code>ffmpeg -i ./input.mp4 \
-acodec copy -format segment -vcodec copy \
-codec:a copy -format segment -codec:v copy \
-reset_timestamps 1 \
-map 0 chunk_%06d.mp4</code></pre></aside>
</section>
Expand Down
1 change: 1 addition & 0 deletions views/if-parentheses.webc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# cSpell:words Rossum
title: "Parentheses on IF statements"
tags: philosophy
date: "2023-09-07"
Expand Down
1 change: 1 addition & 0 deletions views/index.webc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# cSpell:words edgeeffect youtube hackaday stackexchange Symfony nokeep
title:
- "Andy Preston"
- "(Edge Effect)"
Expand Down
1 change: 1 addition & 0 deletions views/little-javascript-examples.webc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# cSpell:words steenkin
title: "Little JavaScript (TypeScript) Examples"
tags: javascript
date: "2024-02-23"
Expand Down
5 changes: 2 additions & 3 deletions views/null-transport.webc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# cSpell:words Symfony
title: "Debugging and Testing with Symfony's Mailer Component"
tags: php
---
Expand Down Expand Up @@ -44,6 +45,4 @@ and paste the following code into the <code>doSend</code> method:</p>

<p>This is just a quick hack-up. The handling of
<code>./var/mail/</code> is hardly what could be called &quot;robust&quot;.
But it's fine for testing and debugging environments.</p>

</article></section>
But it's fine for testing and debugging environments.</p></article></section>
Loading

0 comments on commit cba0f5c

Please sign in to comment.