Skip to content

document passing host paths to scripts #224

@vito

Description

@vito

Current recommended practice is to accept paths as inputs:

(for [{:src src} *stdin*]

And then run with ./bass/test -i src=./. Bass automatically parses ./ into a proper host path. The nice thing about this approach is the script could be fed other types of paths as JSON on stdin, and it also doesn't matter where the Bass scripts run from - you can tuck them all under bass/ instead of needing to put a script in the repo root and use *dir*.

Worth noting the *dir* binding should really only ever be used for loading Bass modules. It shouldn't be used as a shortcut for referencing source code, since that'll make it way to easy to accidentally introduce non-reproducible state into your build. That's what happened with the earlier releases of Bass (maybe it was v0.1.0?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions