Skip to content

how to escape dots #23

@opensas

Description

@opensas

I want to programmatically enter the following settings in my package.json file

  "jest": {
    "transform": {
      "^.+\\.svelte$": "svelte-jester",
      "^.+\\.js$": "babel-jest"
    }
  },

Yeap, it doesn't seem easy at all...

I tried with:

$ npx npe 'jest.transform.^.+\\.svelte$' "svelte-jester"

and I get

  "jest5": {
    "transform": {
      "^": {
        "+\\\\": {
          "svelte$": "svelte-jester"
        }
      }
    }
  }

Any way to achieve it?

Any way to tell npe to treat . as part of the key?

And how about the slashes that are being duplicated?

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