Registry / devops / rollup-plugin-thatworks

rollup-plugin-thatworks

JSON →
library1.0.4jsnpmunverified

A collection of Rollup plugins providing chmod (set executable permissions), directory resolver (allow bare directory imports), and shebang (preserve #! lines) functionality. Current version is 1.0.4, maintained by Harald Rudell. The package bundles three distinct plugins useful for building Node.js CLI executables with Rollup. It has a slow release cadence and is a niche alternative to using individual plugins like rollup-plugin-chmod, rollup-plugin-node-resolve with custom options, and rollup-plugin-preserve-shebang.

npm install rollup-plugin-thatworks
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-THAT
R
rollup-plugin-thatworks
devopsjavascriptv1.0.4
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

chmod
import { chmod } from 'rollup-plugin-thatworks'
import chmod from 'rollup-plugin-thatworks'
The package exports named functions, not a default export. Use destructured imports.
directoryResolver
import { directoryResolver } from 'rollup-plugin-thatworks'
const directoryResolver = require('rollup-plugin-thatworks/directoryResolver')
There is no subpath export; always import from the main package.
shebang
import { shebang } from 'rollup-plugin-thatworks'
const shebang = require('rollup-plugin-thatworks').shebang
For CommonJS, require the whole object and destructure: const { shebang } = require('rollup-plugin-thatworks').
debnugPlugin
import { debnugPlugin } from 'rollup-plugin-thatworks'
The name 'debnugPlugin' is a typo (debug misspelled) but kept for backward compatibility.

A Rollup configuration that uses directoryResolver, shebang, and chmod plugins to build a CLI executable from ES modules.

// rollup.config.js import { chmod, directoryResolver, shebang } from 'rollup-plugin-thatworks'; export default { input: 'src/index.js', output: { file: 'dist/cli.mjs', format: 'esm' }, plugins: [ directoryResolver({ paths: 'src' }), // import from 'dir' instead of '../dir' shebang(), // preserve #!/usr/bin/env node chmod({ mode: 0o755 }) // set executable permissions ] };
Debug
Known issues
breakingRequires Rollup 1.1+; incompatible with Rollup 0.x.
fix
Update Rollup to version 1.1 or higher.
affects: >=0.1.2
deprecatedThe name 'debnugPlugin' is a typo and may be removed in a future major version.
fix
Use import { debnugPlugin } but be aware it's misspelled; alternate plugin rollup-plugin-debug exists.
affects: >=0.1.0
gotchadirectoryResolver only works for directory imports; does not resolve file extensions.
fix
Ensure directories have an index.js or index.mjs file; for file resolution, use rollup-plugin-node-resolve.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'rollup-plugin-thatworks'
Package not installed or not in node_modules.
fix
Run 'npm install rollup-plugin-thatworks --save-dev'
TypeError: chmod is not a function
Importing default instead of named export.
fix
Change 'import chmod from ...' to 'import { chmod } from ...'
Error: [plugin: shebang] Shebang must come first in the file.
source file contains #! not on first line or output code has added extra lines before shebang.
fix
Ensure the input file's shebang is on the very first line (line 1).
Upgrade
Version history
1.0.4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
rollup-plugin-thatworks — npm install rollup-plugin-thatworks · libregistry