refactor(templates): Better template file organization

- .prettierignore & .dockerignore: generate from the repository's
  .gitignore file
- .dockerignore: Ignore .git, *.md, Dockerfile by default
- Remove unnecessary exports for each template
- .gitignore: Better comments and organization
This commit is contained in:
Pratik Tripathy
2025-10-28 21:36:59 +05:30
parent 878a791f42
commit 2e8f827135
5 changed files with 104 additions and 180 deletions

View File

@@ -79,11 +79,7 @@ export FZF_DEFAULT_COMMAND='rg --files --hidden'
export FZF_DEFAULT_OPTS='--layout=reverse --cycle'
export DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker"
[ ! -f "${XDG_CONFIG_HOME}/templates/.gitignore" ] || export GITIGNORE_TEMPLATE="${XDG_CONFIG_HOME}/templates/.gitignore"
[ ! -f "${XDG_CONFIG_HOME}/templates/.prettierrc" ] || export PRETTIER_TEMPLATE="${XDG_CONFIG_HOME}/templates/.prettierrc"
[ ! -f "${XDG_CONFIG_HOME}/templates/.prettierignore" ] || export PRETTIER_IGNORE_TEMPLATE="${XDG_CONFIG_HOME}/templates/.prettierignore"
[ ! -f "${XDG_CONFIG_HOME}/templates/pre-commit" ] || export GIT_PRECOMMIT_TEMPLATE="${XDG_CONFIG_HOME}/templates/pre-commit"
[ ! -f "${XDG_CONFIG_HOME}/templates/.eslintrc.json" ] || export ESLINT_TEMPLATE="${XDG_CONFIG_HOME}/templates/.eslintrc.json"
[ ! -d "${XDG_CONFIG_HOME}/templates" ] || export TEMPLATE_DIR="${XDG_CONFIG_HOME}/templates"
# Python
export PYTHON_HISTORY="${XDG_STATE_HOME}/shell/python_history" # will be picked up by Python 3.13+