Get started Useful scripts

This package provides a pre-configured do folder setup that helps organize your development workflow using npm workspaces. The do folder contains scripts for building and running your Eleventy project.

Install

  1. Install /anyblades/eleventy-blades to reuse pre-defined 11ty scripts from there:
npm install @anyblades/eleventy-blades
  1. Create a helper folder do to symlink the do/package.json within:
mkdir do
cd do/
ln -s ../node_modules/@anyblades/eleventy-blades/packages/do/package.json
  1. Finally register do folder as npm workspace in your root package.json:
{
  ...
  "workspaces": ["do"],
  "scripts": {
    "start": "npm -w do run start",
    "stage": "npm -w do run stage",
    "build": "npm -w do run build"
  },
  ...
}

Done! 🎉 Now you can run:

Live examples

Benefits

Clean separation
Keep build scripts separate from project configuration
Reusable workflows
Update scripts by upgrading the package
Workspace isolation
Scripts run in their own workspace context
Easy maintenance
No need to manually maintain build scripts

More

Find and kill 11ty processes

ps aux | grep eleventy
pkill -f eleventy

You can even combine it with other processes hanging around:

ps aux | grep -E 'eleventy|tailwind|.bin/serve'
pkill -f tailwind
pkill -f .bin/serve