Sorry, not a windows user myself, but I know that you're supposed to use path.join or path.resolve to get valid paths on both Unix and Windows.
I'm thinking that maybe confippet could have a default function root which takes the remaining refs, resolves them, splits them on /, and then uses path.resolve(config.root || process.cwd, ...refs) to generate a valid path on all platforms? So you could e.g. specify paths as icons: '{{root:config.assets:-icons}}'?
I suppose some way to escape : and / in refs would also be necessary.
I think if dealing with paths correctly on Unix and windows is required, confippet could just use path.normalize for anything that's meant to be a path, and internally keep everything as Unix paths.
Sorry, not a windows user myself, but I know that you're supposed to use
path.join
orpath.resolve
to get valid paths on both Unix and Windows.I'm thinking that maybe confippet could have a default function
root
which takes the remaining refs, resolves them, splits them on/
, and then usespath.resolve(config.root || process.cwd, ...refs)
to generate a valid path on all platforms? So you could e.g. specify paths asicons: '{{root:config.assets:-icons}}'
?I suppose some way to escape
:
and/
in refs would also be necessary.