{"id":14894,"library":"rollup-scripts","title":"Rollup Scripts","description":"Rollup Scripts is a zero-configuration compiler and bundler designed for JavaScript and TypeScript libraries, wrapping Rollup's core functionality to eliminate manual setup. It provides out-of-the-box support for JS, TS, React, and Preact projects. Currently at version 0.0.131, it is explicitly marked as experimental and in active development, meaning versions are unstable and intended for trial purposes only. Its primary differentiator is simplifying the build process by abstracting Rollup configurations, reducing boilerplate for library authors. Future updates are planned to extend support to Angular, Vue, and Svelte.","status":"active","version":"0.0.131","language":"javascript","source_language":"en","source_url":"https://github.com/scssyworks/rollup-scripts","tags":["javascript","rollup","bundler","scripts","builder","tooling","lint","test"],"install":[{"cmd":"npm install rollup-scripts","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-scripts","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-scripts","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is a command-line interface (CLI) tool and is not intended for direct import into JavaScript or TypeScript code. It should be executed via 'npx' or npm scripts.","wrong":"import rollupScripts from 'rollup-scripts'","symbol":"rollup-scripts executable","correct":"npx rollup-scripts <command>"},{"note":"The recommended way to use rollup-scripts commands is through npm scripts in your package.json, which automatically handles path resolution and ensures the local installation is used.","wrong":"\"build\": \"node_modules/.bin/rollup-scripts build\"","symbol":"build script","correct":"\"build\": \"rollup-scripts build\""}],"quickstart":{"code":"# 1. Create an npm project\nnpm init -y\n\n# 2. Install rollup-scripts as a dev dependency\nnpm i -D --save-exact rollup-scripts\n\n# 3. Create a source directory and an entry file\nmkdir src\necho \"export const greet = (name) => \\`Hello, \\${name} from Rollup Scripts!\\`;\\nexport const PI = 3.14159;\" > src/index.mjs\n\n# 4. Manually update your package.json file.\n#    Ensure it looks similar to this, especially the 'main', 'module', and 'scripts' sections:\n#    {\n#      \"name\": \"my-library-with-rollup-scripts\",\n#      \"version\": \"1.0.0\",\n#      \"main\": \"dist/umd/index.js\",\n#      \"module\": \"dist/esm/index.mjs\",\n#      \"scripts\": {\n#        \"build\": \"rollup-scripts build\",\n#        \"lint\": \"rollup-scripts lint\",\n#        \"init\": \"rollup-scripts init\"\n#      },\n#      \"devDependencies\": {\n#        \"rollup-scripts\": \"^0.0.131\" // Adjust version as necessary\n#      }\n#    }\n\n# 5. Run the build command\nnpm run build\n\n# After successful build, verify the output (e.g., check 'dist' folder).\n# Example of using the built UMD module:\n# node -e \"const { greet } = require('./dist/umd/index.js'); console.log(greet('AI Agent'));\"","lang":"bash","description":"Initializes an npm project, installs rollup-scripts, creates a basic ESM entry file, provides instructions to configure package.json scripts, and executes a build."},"warnings":[{"fix":"Avoid using in production environments. Monitor the GitHub repository for stable releases (e.g., 1.0.0) and breaking change announcements.","message":"This package is explicitly experimental and in active development. Version 0.0.x is unstable and should only be used for trial purposes. Breaking changes are frequent and without prior notice.","severity":"breaking","affected_versions":"0.0.x"},{"fix":"Install using 'npm i -D --save-exact rollup-scripts' within your project directory.","message":"Do not install this package globally. It is designed to be installed as a local development dependency to ensure project-specific versioning and avoid conflicts.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Carefully follow the 'Getting started' guide in the README, ensuring your project structure and package.json scripts and entry points align with the recommended setup.","message":"Rollup Scripts enforces a 'zero config' approach, which means it expects specific file structures and `package.json` configurations (e.g., 'src/index.mjs' as an entry, 'main'/'module' fields) to function correctly.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Ensure 'rollup-scripts' is installed as a dev dependency ('npm i -D rollup-scripts') and run it via 'npx rollup-scripts <command>' or through an npm script defined in package.json (e.g., 'npm run build').","cause":"The 'rollup-scripts' executable is not in the system's PATH or not accessible in the current project context.","error":"command not found: rollup-scripts"},{"fix":"Verify that a supported entry file exists in your 'src' directory (e.g., 'src/index.mjs') and that your `package.json` 'main' and 'module' fields correctly point to the intended output paths and file types.","cause":"Rollup Scripts could not locate a default entry file (e.g., 'src/index.mjs', 'src/index.js', 'src/index.ts') or the `package.json` 'main'/'module' fields are misconfigured for the intended output.","error":"Error: No entry file found for compilation."}],"ecosystem":"npm"}