Structure mise.toml
This commit is contained in:
@@ -9,6 +9,10 @@ flyctl = 'latest'
|
|||||||
sqlite = 'latest'
|
sqlite = 'latest'
|
||||||
gh = 'latest'
|
gh = 'latest'
|
||||||
|
|
||||||
|
# BUILDING BLOCKS
|
||||||
|
|
||||||
|
# NPM DEPS
|
||||||
|
|
||||||
[tasks.npm-install]
|
[tasks.npm-install]
|
||||||
run = 'npm install'
|
run = 'npm install'
|
||||||
hide = true
|
hide = true
|
||||||
@@ -24,6 +28,8 @@ run = 'npm outdated'
|
|||||||
hide = true
|
hide = true
|
||||||
dir = 'assets'
|
dir = 'assets'
|
||||||
|
|
||||||
|
# TAILWIND DEP
|
||||||
|
|
||||||
[tasks.tailwind-update]
|
[tasks.tailwind-update]
|
||||||
description = 'Update the Tailwind version configured in the project'
|
description = 'Update the Tailwind version configured in the project'
|
||||||
run = 'mix tailwind.update_version'
|
run = 'mix tailwind.update_version'
|
||||||
@@ -34,20 +40,38 @@ description = 'Checks that the Tailwind version is up to date'
|
|||||||
run = 'mix tailwind.check_version'
|
run = 'mix tailwind.check_version'
|
||||||
hide = true
|
hide = true
|
||||||
|
|
||||||
|
# MIX DEPS
|
||||||
|
|
||||||
|
[tasks.mix-update]
|
||||||
|
description = 'Update mix dependencies'
|
||||||
|
run = ['mix deps.update --all']
|
||||||
|
hide = true
|
||||||
|
|
||||||
|
[tasks.mix-outdated]
|
||||||
|
description = 'Show outdated mix dependencies'
|
||||||
|
run = ['mix hex.outdated --all']
|
||||||
|
hide = true
|
||||||
|
|
||||||
|
# PUBLIC TASKS
|
||||||
|
|
||||||
|
# DEPENDENCIES
|
||||||
|
|
||||||
|
[tasks.deps-outdated]
|
||||||
|
depends = ['npm-outdated', 'tailwind-outdated', 'mix-outdated']
|
||||||
|
description = 'Show outdated dependencies'
|
||||||
|
|
||||||
|
[tasks.deps-update]
|
||||||
|
depends = ['npm-update', 'tailwind-update', 'mix-update']
|
||||||
|
description = 'Update dependencies'
|
||||||
|
|
||||||
|
# SETUP
|
||||||
|
|
||||||
[tasks.setup]
|
[tasks.setup]
|
||||||
depends = ['npm-install']
|
depends = ['npm-install']
|
||||||
description = 'Install dependencies and setup the database'
|
description = 'Install dependencies and setup the database'
|
||||||
run = ['mix setup']
|
run = ['mix setup']
|
||||||
|
|
||||||
[tasks.deps-update]
|
# PRODUCTION
|
||||||
depends = ['npm-update', 'tailwind-update']
|
|
||||||
description = 'Update dependencies'
|
|
||||||
run = ['mix deps.update --all']
|
|
||||||
|
|
||||||
[tasks.deps-outdated]
|
|
||||||
depends = ['npm-outdated', 'tailwind-outdated']
|
|
||||||
description = 'Show outdated dependencies'
|
|
||||||
run = ['mix hex.outdated --all']
|
|
||||||
|
|
||||||
[tasks.prod-console]
|
[tasks.prod-console]
|
||||||
description = 'Open an ssh console to the production env'
|
description = 'Open an ssh console to the production env'
|
||||||
@@ -57,15 +81,23 @@ run = 'fly ssh console'
|
|||||||
description = 'Backup the production database to the local development env'
|
description = 'Backup the production database to the local development env'
|
||||||
run = 'mix music_library.prod.db_backup'
|
run = 'mix music_library.prod.db_backup'
|
||||||
|
|
||||||
|
# GIT TOOLING
|
||||||
|
|
||||||
|
[tasks.static-checks-hook]
|
||||||
|
description = '''
|
||||||
|
Pre-commit task to ensure code conforms to static checks policies.
|
||||||
|
|
||||||
|
Install with `mise generate git-pre-commit --write --task=static-checks-hook`
|
||||||
|
'''
|
||||||
|
run = 'mix do format --check-formatted, credo --strict, gettext.extract --check-up-to-date'
|
||||||
|
hide = true
|
||||||
|
|
||||||
|
# DEVELOPMENT/TEST
|
||||||
|
|
||||||
[tasks.static-checks]
|
[tasks.static-checks]
|
||||||
description = 'Run static checks for code formatting, translations, quality'
|
description = 'Run static checks for code formatting, translations, quality'
|
||||||
run = 'mix do format, credo, gettext.extract'
|
run = 'mix do format, credo, gettext.extract'
|
||||||
|
|
||||||
[tasks.static-checks-hook]
|
|
||||||
description = 'Pre-commit task to ensure code conforms to static checks policies'
|
|
||||||
run = 'mix do format --check-formatted, credo --strict, gettext.extract --check-up-to-date'
|
|
||||||
hide = true
|
|
||||||
|
|
||||||
[tasks.test]
|
[tasks.test]
|
||||||
description = 'Run project tests'
|
description = 'Run project tests'
|
||||||
run = 'mix test'
|
run = 'mix test'
|
||||||
@@ -74,6 +106,8 @@ run = 'mix test'
|
|||||||
description = 'Run the application attached to an IEx console'
|
description = 'Run the application attached to an IEx console'
|
||||||
run = 'iex -S mix phx.server'
|
run = 'iex -S mix phx.server'
|
||||||
|
|
||||||
|
# DOCKER
|
||||||
|
|
||||||
[tasks.docker-build]
|
[tasks.docker-build]
|
||||||
description = 'Builds and tags the application Docker image'
|
description = 'Builds and tags the application Docker image'
|
||||||
run = 'docker build -t fullyforged/music_library .'
|
run = 'docker build -t fullyforged/music_library .'
|
||||||
|
|||||||
Reference in New Issue
Block a user