@maizzle/framework
Version:
Maizzle is a framework that helps you quickly build HTML emails with Tailwind CSS.
23 lines (22 loc) • 649 B
JavaScript
import { RenderContextKey } from "./renderContext.js";
import { inject } from "vue";
//#region src/composables/useOutputPath.ts
/**
* Override the output file path for the current template.
*
* The path is relative to the project root (cwd); it may be
* absolute or escape the output directory with `../`. If it
* has no extension, `output.extension` is appended.
*
* Usage in SFC <script setup>:
* ```ts
* useOutputPath('dist/promos/black-friday.html')
* ```
*/
function useOutputPath(path) {
const ctx = inject(RenderContextKey);
if (ctx) ctx.outputPath = path;
}
//#endregion
export { useOutputPath };
//# sourceMappingURL=useOutputPath.js.map