quartz-research-note/quartz/cli/constants.js
Ben Schlegel 4b89202f7e
cleanup: rework cli to allow invoking create and build outside of cli (#428)
* refactor: move `bootstrap-cli.mjs` tp cli

also update reference in docs

* refactor(cli): move build handler to `cli-functions`

* refactor(cli): move create to handler + helpers

* refactor(cli): extract arg definitions

* refactor: rename handlers and helpers

* refactor(cli): move update, await handlers

* refactor(cli): create constants, migrate to helpers

* refactor(cli): migrate `restore`

* refactor(cli): migrate `sync`

* format

* refactor(cli): remove old imports/functions

* refactor(cli): remove unused imports + format

* chore: remove old log statement

* fix: fix imports, clean duplicate code

* fix: relative import

* fix: simplified cacheFile path

* fix: update cacheFile import path

* refactor: move bootstrap-cli to quartz

* format

* revert: revert path to bootstrap-cli

* ci: re-run

* ci: fix  execution permission
2023-08-27 15:59:51 -07:00

16 lines
583 B
JavaScript

import path from "path"
import { readFileSync } from "fs"
/**
* All constants relating to helpers or handlers
*/
export const ORIGIN_NAME = "origin"
export const UPSTREAM_NAME = "upstream"
export const QUARTZ_SOURCE_BRANCH = "v4"
export const cwd = process.cwd()
export const cacheDir = path.join(cwd, ".quartz-cache")
export const cacheFile = "./quartz/.quartz-cache/transpiled-build.mjs"
export const fp = "./quartz/build.ts"
export const { version } = JSON.parse(readFileSync("./package.json").toString())
export const contentCacheFolder = path.join(cacheDir, "content-cache")