dsherret / dax

Cross-platform shell tools for Deno and Node.js inspired by zx.
MIT License
970 stars 33 forks source link

add version.ts #152

Closed sigmaSd closed 1 year ago

sigmaSd commented 1 year ago

fix https://github.com/dsherret/dax/issues/151

this is the current idea I'm testing https://github.com/impactaky/dax_extras/pull/10

with this PR I can do

import { $, CommandBuilder, version as daxVersion } from "https://deno.land/x/dax@0.32.0/mod.ts";
import { addExtras } from "./mod.ts";

addExtras(CommandBuilder, daxVersion); // checks dax version it needs to match the supported version (the one used internally)

// $ now have extra functions

Ideally you would have scripts or ci setup to keep this in sync with the git tag and deno.land release, for example I think deno_std have some internal tooling for this