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

Ensure exports match glob #27

Closed
bennypowers opened this issue Feb 2, 2023 · 1 comment
Closed

Ensure exports match glob #27

bennypowers opened this issue Feb 2, 2023 · 1 comment

Comments

@bennypowers
Copy link

Cool package! thanks for publishing!

Given this dir structure in a package root, I want to ensure that exports includes all of those files.

elements
├── pf-accordion
│   ├── pf-accordion-header.js
│   ├── pf-accordion.js
│   └── pf-accordion-panel.js
├── pf-avatar
│   └── pf-avatar.js
├── pf-badge
│   └── pf-badge.js
└── pf-tooltip
    └── pf-tooltip.js

20 directories, 26 files

So linting with an option like exportGlobs: ['elements/*/pf-*.js'],

This "exports" field should fail

{ '.': './pfe.js' }

and this one should pass:

{
  '.': './pfe.js',
  './pf-accordion/pf-accordion-header.js': './pf-accordion/pf-accordion-header.js',
  './pf-accordion/pf-accordion-panel.js': './pf-accordion/pf-accordion-panel.js',
  './pf-accordion/pf-accordion.js': './pf-accordion/pf-accordion.js',
  './pf-avatar/pf-avatar.js': './pf-avatar/pf-avatar.js',
  './pf-badge/pf-badge.js': './pf-badge/pf-badge.js',
  './pf-tooltip/pf-tooltip.js': './pf-tooltip/pf-tooltip.js'
}
@bluwy
Copy link
Owner

bluwy commented Feb 2, 2023

Hi, I'm not really sure what you're requesting here, how does

So linting with an option like exportGlobs: ['elements/*/pf-*.js'],

work? I did notice though that I didn't handle glob subpath patterns with multiple * (only supports one * now), maybe you're referring to this issue?

@bluwy bluwy closed this as not planned Won't fix, can't repro, duplicate, stale Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants