✨ feat(mise): add template files
This commit is contained in:
parent
4cc814caa8
commit
491a5cfff2
5 changed files with 170 additions and 0 deletions
20
.config/mise/templates/go.toml
Normal file
20
.config/mise/templates/go.toml
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Install Go dependencies
|
||||
[tasks.install]
|
||||
alias = "i"
|
||||
run = "go mod tidy"
|
||||
|
||||
# Add a new dependency
|
||||
[tasks.add]
|
||||
run = "go get"
|
||||
|
||||
# Run the application
|
||||
[tasks.dev]
|
||||
run = "go run main.go"
|
||||
|
||||
# Run linting
|
||||
[tasks.lint]
|
||||
run = "golangci-lint run"
|
||||
|
||||
# Run formatting
|
||||
[tasks.format]
|
||||
run = "gofumpt -l -w ."
|
39
.config/mise/templates/node.toml
Normal file
39
.config/mise/templates/node.toml
Normal file
|
@ -0,0 +1,39 @@
|
|||
[env]
|
||||
# Set up the path for node module binaries
|
||||
BIN_PATH = "{{ cwd }}/node_modules/.bin"
|
||||
|
||||
[tools]
|
||||
# Install Node.js using the specified version
|
||||
# node = "{{ env['NODE_VERSION'] | default(value='lts') }}" # LTS Version
|
||||
# node = "{{ get_env(name='NODE_VERSION', default='18.2') }}" # Specific version
|
||||
node = "latest"
|
||||
pnpm = "latest"
|
||||
|
||||
# Install npm dependencies
|
||||
[tasks.install]
|
||||
run = "pnpm install"
|
||||
|
||||
# Add a new dependency
|
||||
[tasks.add]
|
||||
run = "pnpm add"
|
||||
|
||||
# Run the development server
|
||||
[tasks.dev]
|
||||
alias = "d"
|
||||
run = "pnpm run dev"
|
||||
|
||||
# Run linting
|
||||
[tasks.lint]
|
||||
run = "eslint src/"
|
||||
|
||||
# Run formatting
|
||||
[tasks.format]
|
||||
run = "prettierd src/"
|
||||
|
||||
# Run tests
|
||||
[tasks.test]
|
||||
run = "jest"
|
||||
|
||||
# Build the project
|
||||
[tasks.build]
|
||||
run = "pnpm run build"
|
39
.config/mise/templates/python-poetry.toml
Normal file
39
.config/mise/templates/python-poetry.toml
Normal file
|
@ -0,0 +1,39 @@
|
|||
[env]
|
||||
_.python.venv = { path = ".venv", create = true }
|
||||
|
||||
[tools]
|
||||
poetry = { version = "latest", pyproject = "pyproject.toml" }
|
||||
|
||||
# Installs the specified Python version
|
||||
# python = "{{ get_env(name='PYTHON_VERSION', default='3.11') }}" # Specific version
|
||||
python = "latest"
|
||||
|
||||
# Install dependencies
|
||||
[tasks.install]
|
||||
alias = "i"
|
||||
run = "poetry install"
|
||||
|
||||
# Add a new dependency
|
||||
[tasks.add]
|
||||
alias = "a"
|
||||
run = "poetry add"
|
||||
|
||||
# Update dependencies
|
||||
[tasks.update]
|
||||
run = "poetry update"
|
||||
|
||||
# Run the application
|
||||
[tasks.run]
|
||||
run = "python main.py"
|
||||
|
||||
# List dependencies
|
||||
[tasks.deps]
|
||||
run = "poetry show --tree"
|
||||
|
||||
# Run tests
|
||||
[tasks.test]
|
||||
run = "pytest tests/"
|
||||
|
||||
# Lint the code
|
||||
[tasks.lint]
|
||||
run = "ruff src/"
|
39
.config/mise/templates/python-uv.toml
Normal file
39
.config/mise/templates/python-uv.toml
Normal file
|
@ -0,0 +1,39 @@
|
|||
[env]
|
||||
# Automatic virtualenv activation
|
||||
_.python.venv = { path = ".venv", create = true }
|
||||
|
||||
[tools]
|
||||
# Installs the specified Python version
|
||||
# python = "{{ get_env(name='PYTHON_VERSION', default='3.11') }}" # Specific version
|
||||
python = "latest"
|
||||
uv = "latest"
|
||||
ruff = "latest"
|
||||
|
||||
# Install dependencies
|
||||
[tasks.install]
|
||||
alias = "i"
|
||||
run = "uv pip install -r requirements.txt"
|
||||
|
||||
# Add a new dependency
|
||||
[tasks.add]
|
||||
run = "uv pip install"
|
||||
|
||||
# Run the application
|
||||
[tasks.run]
|
||||
run = "python main.py"
|
||||
|
||||
# List dependencies
|
||||
[tasks.deps]
|
||||
run = "uv pip list"
|
||||
|
||||
# Run tests
|
||||
[tasks.test]
|
||||
run = "pytest tests/"
|
||||
|
||||
# Lint the code
|
||||
[tasks.lint]
|
||||
run = "ruff src/"
|
||||
|
||||
# Format the code
|
||||
[tasks.format]
|
||||
run = "ruff format src/"
|
33
.config/mise/templates/rust.toml
Normal file
33
.config/mise/templates/rust.toml
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Install Rust dependencies
|
||||
[tasks.install]
|
||||
alias = "i"
|
||||
run = "cargo build"
|
||||
|
||||
# Add a new dependency
|
||||
[tasks.add]
|
||||
run = "cargo add"
|
||||
|
||||
# Run the application
|
||||
[tasks.dev]
|
||||
run = "cargo run"
|
||||
|
||||
# Run linting
|
||||
[tasks.lint]
|
||||
run = "cargo clippy"
|
||||
|
||||
# Run formatting
|
||||
[tasks.format]
|
||||
run = "cargo fmt"
|
||||
|
||||
# Run tests
|
||||
[tasks.test]
|
||||
run = "cargo test"
|
||||
|
||||
# Cleaning the cache
|
||||
[tasks.clean]
|
||||
depends = ['cleancache']
|
||||
run = "cargo clean"
|
||||
|
||||
[tasks.cleancache]
|
||||
run = "rm -rf .cache"
|
||||
hide = true
|
Loading…
Add table
Reference in a new issue