Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdbd committed Jan 13, 2024
1 parent f986d2d commit 5cad88c
Show file tree
Hide file tree
Showing 82 changed files with 1,404 additions and 571 deletions.
7 changes: 3 additions & 4 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# export DEBUG="Eleventy:EleventyErrorHandler"
export DEBUG="Eleventy:EleventyErrorHandler,11ty-plugin*"
export DEBUG="Eleventy:EleventyErrorHandler,11ty-test-utils"
# export DEBUG="Eleventy:EleventyErrorHandler,11ty-test-utils,11ty-plugin*"
# export DEBUG="DevEleventy:*,Eleventy*"
export ELEVENTY_ENV=development
export NODE_ENV=production
export NODE_DEBUG="script:*"
export SKIP_TELEGRAM_MESSAGES=1

# secrets exposed as environment variables
export GOOGLE_APPLICATION_CREDENTIALS=/run/secrets/prj-kitchen-sink/sa-storage-uploader
# export GOOGLE_APPLICATION_CREDENTIALS=/run/secrets/prj-kitchen-sink/sa-storage-uploader
export PLAUSIBLE=$(cat /run/secrets/plausible/test_site)
export TELEGRAM=$(cat /run/secrets/telegram/personal_bot)
16 changes: 10 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, macos-latest]
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
# os: [ubuntu-latest, macos-latest, windows-latest]
# Test all packages with:
# 1. Maintenance LTS
# 2. Active LTS
# 3. Current (i.e. the latest Node.js version available)
# https://nodejs.org/en/about/previous-releases
node: ['lts/Hydrogen', 'lts/Iron', 'current']
node: [ lts/Iron]
# node: [lts/Hydrogen, lts/Iron, current]
# https://www.npmjs.com/package/@11ty/eleventy?activeTab=versions
eleventy: ['3.0.0-alpha.4']
steps:
Expand Down Expand Up @@ -53,11 +56,12 @@ jobs:

- name: 🔍 Test @jackdbd/eleventy-plugin-ensure-env-vars
env:
DEBUG: Eleventy:EleventyErrorHandler,11ty-plugin*
NODE_ENV: test
run: npm run test:ci -w packages/eleventy-plugin-ensure-env-vars

- name: 🔍 Test @jackdbd/eleventy-plugin-permissions-policy
run: npm run test:ci -w packages/eleventy-plugin-permissions-policy
# - name: 🔍 Test @jackdbd/eleventy-plugin-permissions-policy
# run: npm run test:ci -w packages/eleventy-plugin-permissions-policy

- name: 🔍 Test @jackdbd/eleventy-plugin-telegram
env:
Expand All @@ -66,8 +70,8 @@ jobs:

- name: 🔍 Test @jackdbd/eleventy-plugin-text-to-speech
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
TELEGRAM: ${{ secrets.TELEGRAM }}
SA_JSON_KEY_STORAGE_UPLOADER: ${{ secrets.SA_JSON_KEY_STORAGE_UPLOADER }}
SA_JSON_KEY_TEXT_TO_SPEECH: ${{ secrets.SA_JSON_KEY_TEXT_TO_SPEECH }}
run: npm run test:ci -w packages/eleventy-plugin-text-to-speech

- name: ⬆️ Upload test coverage to Codecov
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/release-to-npmjs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ jobs:
matrix:
os: [ubuntu-latest]
# Use the Active LTS for this workflow
# https://nodejs.org/en/
# https://nodejs.org/en/about/releases/
node: ['16.17.0']
# https://nodejs.org/en/about/previous-releases
node: ['lts/Iron']
steps:
- name: 🛎️ Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: ⚙️ Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

Expand Down
36 changes: 34 additions & 2 deletions custom-types/11ty__eleventy/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,42 @@
declare module '@11ty/eleventy' {
type TransformFn = (content: string, outputPath: string) => Promise<string>
/**
* Event names available in Eleventy plugins.
*
* @see [Events](https://www.11ty.dev/docs/events/)
*/
export type EventName =
| 'eleventy.before'
| 'eleventy.after'
| 'eleventy.beforeWatch'

/**
* Object available in `eleventy.before` and `eleventy.after` event handlers.
*
* @see [Event Arguments](https://www.11ty.dev/docs/events/#event-arguments)
*/
export interface EventArguments {
inputDir: string
dir: { input: string; includes: string; data: string; output: string }
runMode: 'build' | 'watch' | 'serve'
outputMode: 'fs' | 'json' | 'ndjson'
incremental: boolean
// eslint-disable-next-line @typescript-eslint/no-explicit-any
results?: any
}

type EventHandler = (arg: EventArguments) => void | Promise<void>

type TransformHandler = (
content: string,
outputPath: string
) => string | Promise<string>

export interface EleventyConfig {
userConfig: any
verbose: boolean
addPlugin(pluginFn: () => void, pluginOptions: Object): Promise<void>
addTransform(name: string, fn: TransformFn): Promise<void>
addTransform(transformName: string, fn: TransformHandler): Promise<void>
on(eventName: EventName, fn: EventHandler): Promise<void>
}

interface Options {
Expand Down
2 changes: 1 addition & 1 deletion docs/eleventy-plugin-ensure-env-vars/assets/navigation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/eleventy-plugin-ensure-env-vars/assets/search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/eleventy-plugin-ensure-env-vars/index.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions docs/eleventy-plugin-ensure-env-vars/interfaces/Options.html

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions docs/eleventy-plugin-ensure-env-vars/modules.html

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions docs/eleventy-plugin-ensure-env-vars/variables/env_var.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/eleventy-plugin-telegram/assets/navigation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/eleventy-plugin-telegram/assets/search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion docs/eleventy-plugin-telegram/functions/telegramPlugin.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/eleventy-plugin-telegram/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions docs/eleventy-plugin-telegram/interfaces/EleventyConfig.html

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions docs/eleventy-plugin-telegram/interfaces/Options.html

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions docs/eleventy-plugin-telegram/modules.html

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/eleventy-plugin-telegram/types/EleventyConfig.html

This file was deleted.

2 changes: 1 addition & 1 deletion docs/eleventy-plugin-text-to-speech/assets/navigation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/eleventy-plugin-text-to-speech/assets/search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Loading

0 comments on commit 5cad88c

Please sign in to comment.