custodio
Builder-agnostic plugin to allow restricting import patterns in certain parts of your code-base.
Usage
Install package:
npm install custodio
import { dirname } from 'node:path'
import { CustodioPlugin } from 'custodio'
const build = await rollup({
input: 'entry.js',
plugins: [
CustodioPlugin.rollup({
cwd: dirname(import.meta.url),
include: [/src\/*/],
patterns: [
[/^node:.*/],
['@nuxt/kit', 'Importing from @nuxt kit is not allowed in your src/ directory']
]
}),
],
})
🚧 TODO
💻 Development
- Clone this repository
- Enable Corepack using
corepack enable
- Install dependencies using
pnpm install
- Run interactive tests using
pnpm dev
License
Made with ❤️
Published under MIT License.