Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Populate one configuration depending on the given glob pattern #48

Open
olehan opened this issue Mar 10, 2021 · 0 comments
Open

Populate one configuration depending on the given glob pattern #48

olehan opened this issue Mar 10, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested

Comments

@olehan
Copy link
Member

olehan commented Mar 10, 2021

Is your feature request related to a problem? Please describe.
collect requires you to have a rollup.config.js in every single package, but sometimes packages have an orderly simple, and repetitive configuration files.

Describe the solution you'd like
A function in @azimutlabs/rollup that would populate one configuration depending on the given glob pattern.
Use case example would be:

// Root of the mono-repo
// rollup.config.js
import { fromWorkspaces, populate } from '@azimutlabs/rollup';
import { compose } from '@azimutlabs/rollup-config';
import { babel } from '@azimutlabs/rollup-config-babel';

export default populate(
  // Will consider every directories matching glob pattern `ui.*` under a `packages` directory a rollup workspaces.
  // (requires valid `src` directory and package.json to sort the compile order using dependency graph)
  ['packages/ui.*', babel('es')],
  ['examples/*', babel('cjs')],
);

Describe alternatives you've considered
We could give #41 more thoughts and stick to 1 package = 1 config.

@olehan olehan added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested labels Mar 10, 2021
@olehan olehan added this to the v1 milestone Mar 10, 2021
@olehan olehan removed this from the v1 milestone Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant