undici

monorepo for my 11ty plugins

Downloads
1K
Stars
0
Committers
2

undici 🕚

Monorepo for my Eleventy plugins.

📌 Note to self

When Eleventy 3 becomes available as a regular release and is no longer in alpha, update the peerDependencies of all packages from:

"@11ty/eleventy": ">=2.0.0 || 3.0.0-alpha.6"

to:

"@11ty/eleventy": ">=3.0.0"

Also, don't forget to update the GitHub workflows.

Note: Eleventy supports both CJS and ESM from version 3 onwards. However, I plan to publish only ESM packages for my Eleventy plugins. This means that each one of my plugins should declare >=3.0.0 in its peerDependencies.

Package Version Install size Coverage Docs
@jackdbd/eleventy-plugin-content-security-policy npm version install size Coverage Docs
@jackdbd/eleventy-plugin-ensure-env-vars npm version install size Coverage Docs
@jackdbd/eleventy-plugin-plausible npm version install size Coverage Docs
@jackdbd/eleventy-plugin-telegram npm version install size Coverage Docs
@jackdbd/eleventy-plugin-text-to-speech npm version install size Coverage Docs
@jackdbd/hosting-utils npm version install size Coverage Docs

đŸ“Ļ ESM only:

All libraries of this monorepo are published to npmjs as ECMAScript modules.

See also:

Installation

Clone the repo:

git clone [email protected]:jackdbd/undici.git

cd undici

⚠ī¸ Overrides

This project defines 2 overrides for these packages:

  • @typescript-eslint/eslint-plugin
  • eleventy-plugin-helmet

Refer to the npm documentation to know more about overrides.

This project is tested on Node.js >=18.0.0.

You can use a Node.js version manager like nvm, asdf or volta to manage your Node.js versions.

Install all dependencies from npm.js:

npm install --include dev

ℹī¸ by passing --include dev we can be sure that we are installing devDependencies even when NODE_ENV is set to production. This is important because we should always set NODE_ENV=production.

Git hooks

This project uses simple-git-hooks to run the following git hooks:

  • pre-commit
  • pre-push

Don't forget to run this command whenever you need to setup/update any git hook:

npx simple-git-hooks

Development

This monorepo uses Typescript project references to build all of its libraries.

This project has 49 dev dependencies: @11ty/eleventy, @11ty/eleventy-fetch, @aws-sdk/client-s3, @aws-sdk/lib-storage, @commitlint/cli, @commitlint/config-conventional, @google-cloud/storage, @google-cloud/text-to-speech, @jackdbd/checks, @jackdbd/content-security-policy, @jackdbd/zod-to-doc, @microsoft/api-documenter, @microsoft/api-extractor, @qiwi/multi-semantic-release, @reporters/github, @semantic-release/changelog, @semantic-release/exec, @semantic-release/git, @thi.ng/transclude, @types/debug, @types/html-to-text, @types/jsdom, @types/yargs, @typescript-eslint/eslint-plugin, debug, eslint, eslint-config-prettier, eslint-plugin-prettier, lint-staged, micromark, npm-run-all, pkg-size, prettier, pretty-error, publint, rimraf, semantic-release, semantic-release-telegram, serve, simple-git-hooks, specificity, taze, tsm, typedoc, typedoc-plugin-zod, typescript, wrangler, yargs, zx.

Build all libraries (i.e. 11ty plugins) in watch mode:

npm run dev:libs

You can also run build / dev / test on a single package. For example:

npm run build -w packages/eleventy-plugin-telegram
npm run dev -w packages/eleventy-plugin-telegram
npm run test -w packages/eleventy-plugin-telegram

Demo site

See these Eleventy plugins configured for the demo site that you can find in this monorepo.

The website is deployed to Cloudflare Pages and available at https://undici.pages.dev/

Monorepo management

Environment variables and secrets

For local development I rely on some environment variables and secrets. They are all set using a .envrc file. In my case this .envrc file can be tracked in git because the environment variables I use are non-sensitive configuration, and the secrets exist only on my filesystem. See also nix-config to learn how I encrypt my secrets.

Scripts

See scripts.

Package Rankings
Top 13.34% on Npmjs.org
Badges
Extracted from project README
codecov Conventional Commits npm version install size npm version install size npm version install size npm version install size npm version install size npm version install size
Related Projects