Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.
This repository was archived by the owner on May 13, 2026. It is now read-only.

"Default Path" for installing files #30

Open

Description

@dmolsen

PL installer should support a default path option in a package install. This way an author can develop small modules that can be included in other StarterKits but they don't have to worry about matching the target's filesystem exactly. If it does then great. Otherwise give them an out. It'd work like:

composer.json...
"extra": {
   "patternlab": {
       "defaultPath": "atoms/general",
       "patternDir": [
           { "*": "\\defaultPath" }
       ]
   }
}

The above would try to move everything in ./dist in the package and:

  1. use the user-defined patternDir and try to install in the given default path. In this case it's atoms/general. It would check numbering just in case. If that didn't work...
  2. try each directory in the default path as keywords and compare against a user-supplied mapping in ./config. If that didn't work...
  3. prompt the user to type in an install location

This feature should also support an array of path key/value pairs so multiple default paths could be set-up. The following install locations should support default paths:

  • publicDir,
  • sourceDir, and
  • dataDir.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions