Skip to content

feat(config): use named paths without the @ prefix #15

@richrdkng

Description

@richrdkng

Instead of using the named path replacements with the @ prefix, provide the ability to match paths without them, e.g.:

const path = require('@nodewell/path')

// instead of this...
path('@src/**/*.*')

// ...use like this
path('src/**/*.*')
  • leaving the @ prefix is optional, the paths can be used with or without the @ prefix
  • the '@' alone will always mean the root directory (or the configured root)
  • leaving the @ prefix in the path config file is also a possibility, e.g.: instead of "@src": "./src", it's possible to define custom paths like this: "src": "./src"
  • in the config files, path values can be used too without the @ prefix, e.g.: instead of "images": "@assets/images", use like this: "images": "assets/images"
  • add a config option for this feature in the .pathsrc file

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions