Skip to content

feat: regex substitutions - #289

Merged
loeffel-io merged 2 commits into
masterfrom
feature/loeffel-io/regex-substitutions
Mar 26, 2025
Merged

feat: regex substitutions#289
loeffel-io merged 2 commits into
masterfrom
feature/loeffel-io/regex-substitutions

Conversation

@loeffel-io

@loeffel-io loeffel-io commented Mar 26, 2025

Copy link
Copy Markdown
Owner

supports regex substitutions

every directory can be referenced by ${i}
for instance, directory test/google/linter will expose 3 variables:

  • test: ${2}
  • google: ${1}
  • linter: ${0}

example:

ls: 
    components/*: # e.g.: components/button
        .ts: regex:${0}  # e.g.: components/button/button.ts
        .*.scss: regex:${0} # e.g.: components/button/button.module.scss
        
        tests:
            .test.ts: regex:${1} # e.g.: components/button/tests/button.test.ts

future plans

  • modifiers like ${0:kebab-case}
  • performance optimizations: substitutions can be cached etc

closes #59

@loeffel-io loeffel-io self-assigned this Mar 26, 2025
@loeffel-io
loeffel-io merged commit 89db5b1 into master Mar 26, 2025
@loeffel-io
loeffel-io deleted the feature/loeffel-io/regex-substitutions branch March 26, 2025 18:52
@loeffel-io loeffel-io mentioned this pull request Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for ComponentName/ComponentName.tsx

1 participant