{"id":15766,"library":"poops","title":"Poops: Web Bundler and Static Site Generator","description":"Poops is a straightforward, no-bullshit bundler and static site generator for web projects, currently stable at version 1.2.2. It leverages highly efficient tools like esbuild for JavaScript/TypeScript/JSX/TSX bundling and transpilation, and dart-sass for SCSS/SASS to CSS compilation. The package also integrates PostCSS for advanced CSS processing, including Tailwind CSS support, and offers design token integration (W3C DTCG & Style Dictionary). For static site generation, it supports swappable template engines, Nunjucks (default) or Liquid, with features for blogging, pagination, RSS/Atom/JSON feed generation, and React pre-rendering (Reactor). Poops prioritizes an intuitive, minimal-learning-curve approach, primarily driven by a simple JSON configuration file. Releases appear to be frequent, with minor versions rolling out new features and fixes every few weeks.","status":"active","version":"1.2.2","language":"javascript","source_language":"en","source_url":"https://github.com/stamat/poops","tags":["javascript","bundler","sass","nunjucks","liquid","esbuild","dart-sass","tailwindcss"],"install":[{"cmd":"npm install poops","lang":"bash","label":"npm"},{"cmd":"yarn add poops","lang":"bash","label":"yarn"},{"cmd":"pnpm add poops","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for PostCSS processing pipeline, including Tailwind CSS support.","package":"postcss","optional":false}],"imports":[{"note":"Poops migrated entirely to ES modules in v1.1.0. Programmatic usage must use ESM imports.","wrong":"const { build } = require('poops');","symbol":"build","correct":"import { build } from 'poops';"},{"note":"The `serve` function starts the local development server and rebuilds on file changes. ESM-only since v1.1.0.","wrong":"const { serve } = require('poops');","symbol":"serve","correct":"import { serve } from 'poops';"},{"note":"While Poops can be installed globally (`npm i -g poops`), local installation and execution via `npx` is recommended for project-specific versions. The `💩` emoji is an alias for the `poops` command.","wrong":"node poops.js","symbol":"CLI usage","correct":"npx poops"}],"quickstart":{"code":"npm i -D poops\n\n// poops.json in your project root\n{\n  \"scripts\": [\n    {\n      \"in\": \"example/src/js/main.ts\",\n      \"out\": \"example/dist/js/scripts.js\",\n      \"options\": {\n        \"sourcemap\": true,\n        \"minify\": true,\n        \"justMinified\": false,\n        \"format\": \"iife\",\n        \"target\": \"es2019\"\n      }\n    }\n  ],\n  \"styles\": [\n    {\n      \"in\": \"example/src/scss/main.scss\",\n      \"out\": \"example/dist/css/styles.css\",\n      \"options\": {\n        \"sourcemap\": true,\n        \"minify\": true,\n        \"postcss\": [\n          \"tailwindcss/nesting\",\n          \"tailwindcss\",\n          \"autoprefixer\"\n        ]\n      }\n    }\n  ],\n  \"markup\": [\n    {\n      \"in\": \"example/src/markup/index.liquid\",\n      \"out\": \"example/dist/index.html\",\n      \"data\": \"example/src/data\"\n    }\n  ]\n}\n\n// In your package.json scripts:\n// \"build\": \"npx poops\"\n\n// Run the build:\nnpx poops","lang":"json","description":"Demonstrates local installation, a basic `poops.json` configuration for bundling JavaScript, Sass, and Liquid templates, and how to execute the build command."},"warnings":[{"fix":"Update CommonJS `require()` calls to ES module `import` statements. Ensure your consuming project is configured for ESM (e.g., `\"type\": \"module\"` in package.json or using `.mjs` extensions).","message":"Version 1.1.0 migrated the entire codebase from CommonJS to ES modules. Any programmatic `require()` statements for Poops will break and must be updated to `import` syntax.","severity":"breaking","affected_versions":">=1.1.0"},{"fix":"Install `postcss` alongside Poops: `npm install postcss` or `yarn add postcss`.","message":"Poops requires `postcss` as a peer dependency. If not installed, PostCSS features, including Tailwind CSS integration, will fail.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure your configuration file is named `poops.json` or `💩.json` in the project root, or run `npx poops yourCustomConfig.json`.","message":"The configuration file for Poops must be named either `poops.json` or `💩.json` in the project root by default. Using other names requires specifying the path when running the command.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Refer to the Poops documentation or examples for the correct structure of template files, data directories, and configuration for markup processing. Pay attention to how data is loaded and referenced within templates.","message":"When using the `markup` feature with template engines like Nunjucks or Liquid, ensure your template files and data structures align with the expected formats, especially for features like collections, pagination, and data loading from directories. Incorrect paths or data structures can lead to rendering issues.","severity":"gotcha","affected_versions":">=1.2.0"}],"env_vars":null,"last_verified":"2026-04-21T00:00:00.000Z","next_check":"2026-07-20T00:00:00.000Z","problems":[{"fix":"Change `require()` calls to `import` statements (e.g., `import { build } from 'poops';`) and ensure your Node.js environment or calling script supports ESM.","cause":"Attempting to `require('poops')` or use CommonJS syntax after Poops migrated to ES modules in v1.1.0.","error":"SyntaxError: Cannot use import statement outside a module"},{"fix":"Install `postcss`: `npm install postcss` or `yarn add postcss`.","cause":"The `postcss` peer dependency is missing from your project.","error":"Error: Cannot find module 'postcss'"},{"fix":"Create `poops.json` or `💩.json` in your project's root, or ensure the custom config path passed to `npx poops` is correct.","cause":"The default configuration file `poops.json` (or `💩.json`) is missing from the project root, or a custom path was provided incorrectly.","error":"Error: Config file not found at path: poops.json"},{"fix":"Install Tailwind CSS (`npm install tailwindcss`) and ensure it's correctly listed in your PostCSS plugins array in `poops.json` and a `tailwind.config.js` exists if needed.","cause":"Tailwind CSS is configured in `postcss` options but is not installed or incorrectly referenced.","error":"Error: 'tailwindcss' is not found. Make sure it's installed and configured correctly."}],"ecosystem":"npm"}