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

@@ -1,30 +1,18 @@
# ---- KDE Neon ----
# KDE directory preferences
# ----- OS Artifacts ----
# Linux
.Trash-*
.directory
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# ---- macOS ----
# General
# macOS
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
@@ -46,6 +34,19 @@ Network Trash Folder
Temporary Items
.apdisk
# Other Files to ignore
**app_stat_v2.db
.ssh/*.pub
**/Package Control.cache
**Cache
*.db
*.qmlc
*.qml
*.jsc
**/contents/images
**/contents/fonts
*kpluginindex.json
# ---- IDE ----
# Vim Artifacts
**.swp
@@ -68,14 +69,25 @@ resharper-host/
tasks/
# ---- Programming Languages ----
# Ignore all downloaded node modules
# Javascript
**/node_modules/*
dist
dist-ssr
*.local
# Ignore all minified js files
*.min.js
# Rust
target/
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
**/built/
# Log files
logs
*.log
@@ -84,18 +96,3 @@ yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
# Other Files to ignore
**app_stat_v2.db
.ssh/*.pub
**/Package Control.cache
**Cache
*.db
*.qmlc
*.qml
*.jsc
**/contents/images
**/contents/fonts
*kpluginindex.json
**/built/

View File

@@ -1,109 +0,0 @@
build
coverage
# ---- KDE Neon ----
# KDE directory preferences
.directory
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# ---- macOS ----
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# ---- IDE ----
# Vim Artifacts
**.swp
lazy-lock.json
.luarc.json
# VS Code Artifacts
/.vscode/
**state.vscdb
**state.vscdb.backup
.vscode/extensions/** # Ignore all Files under .vscode/extensions/
!.vscode/extensions/**/*.json # Only json files inside the .vscode/extensions/ folder
# Intellij IDE Artifacts
.idea/
*.imi
*.jar
*.tar
resharper-host/
tasks/
# ---- Programming Languages ----
# Ignore all downloaded node modules
**/node_modules/*
dist
dist-ssr
*.local
# Ignore all minified js files
*.min.js
# Log files
..logs/
*.log
# Other Files to ignore
**app_stat_v2.db
.ssh/*.pub
**/Package Control.cache
**Cache
*.db
*.qmlc
*.qml
*.jsc
**/contents/images
**/contents/fonts
*kpluginindex.json
*backup
*undo
*sessions
*.bak
nvim_switch/
*kitty/*.py
.prettierignore
package-lock.json
.prettierrc
**/built/

View File

@@ -1,14 +1,7 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
# Check if Gitleaks is installed
if ! command -v gitleaks > /dev/null 2>&1; then
if ! command -v gitleaks >/dev/null 2>&1; then
echo "Gitleaks is not installed. Skipping leak check."
echo "Please install Gitleaks for enhanced security."
exit 0

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+