Skip to content

Add option to omit specific string #25

@ColCh

Description

@ColCh

Example:
I have file src/foo/index.ts
And I want to get relative path for it from src/bar.ts
I want to get relative path like ./foo

In this case, /index.ts is omitted

So, this extension is amazing and I'm mind to open Pull Request for this feature.

But I need to discuss usage and api for it.

May be make it array of regs?

kinda

given
config.omit = [ /\/index.ts$/ ], and relative path src/foo/index.ts
regexp in omit config will match string: /index.ts.
And so I will just remove it from resulting relative path. Result will be src/foo

What do you think @jakob101 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions