-
Notifications
You must be signed in to change notification settings - Fork 1
Migrate project configuration and tasks to Mise #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [shell_alias] | ||
| mr = "mise run" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| [task_config] | ||
| dir = "{{ config_root }}" | ||
|
|
||
| [env] | ||
| '_'.path = { path = "./node_modules/.bin" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| [env] | ||
| ## This is the template that is copied to mise.local.toml for local overrides | ||
| ## This copy is committed to VCS to provide an example of local overrides | ||
| ## Update it whenever new env vars are added to the project that may need local overrides | ||
| # Local environment overrides | ||
| # Uncomment and modify the variables below as needed | ||
|
|
||
| # VITE_PORT = 5173 | ||
| # STORYBOOK_PORT = 6006 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| [vars] | ||
| build_dir = ".var/dist" | ||
| webapp_out_dir = "{{ vars.build_dir }}/webapp" | ||
| storybook_out_dir = "{{ vars.build_dir }}/storybook" | ||
| gh_pages_out_dir = "{{ vars.build_dir }}/gh-pages" | ||
|
|
||
| # exposing defaults to terminal so that | ||
| # direct commands can be run consistently with tasks | ||
| [env] | ||
| # asserted in vite.config.ts | ||
| WEBAPP_OUT_DIR = "{{ vars.webapp_out_dir }}" | ||
| WEBAPP_BASE_URL = "/" | ||
| # asserted in .storybook/main.ts | ||
| STORYBOOK_BASE_URL = "/" | ||
| # expected in .github/workflows/deploy.yml | ||
| GH_PAGES_OUT_DIR = "{{ vars.gh_pages_out_dir }}" | ||
|
|
||
| [tasks."build:webapp:base"] | ||
| hide = true | ||
| usage = ''' | ||
| arg "<dir>" env="WEBAPP_OUT_DIR" default="{{ vars.webapp_out_dir }}" help="Output directory for the webapp build" | ||
| arg "<base>" env="WEBAPP_BASE_URL" default="/" help="Base URL for the webapp" | ||
| ''' | ||
| run = "WEBAPP_OUT_DIR=${usage_dir?} WEBAPP_BASE_URL=${usage_base?} vite build" | ||
|
|
||
| [tasks."build:webapp"] | ||
| description = "Build Application" | ||
| run = "mise run build:webapp:base" | ||
| sources = ["src/**/*.{ts,tsx}", "index.html", "vite.config.ts"] | ||
| outputs = ["{{ vars.webapp_out_dir }}/**/*"] | ||
|
|
||
| [tasks."build:storybook:base"] | ||
| hide = true | ||
| usage = ''' | ||
| arg "<dir>" env="STORYBOOK_OUT_DIR" default="{{ vars.storybook_out_dir }}" help="Output directory for the Storybook build" | ||
| arg "<base>" env="STORYBOOK_BASE_URL" default="/" help="Base URL for the Storybook" | ||
| ''' | ||
| run = "STORYBOOK_BASE_URL=${usage_base?} storybook build -o ${usage_dir?}" | ||
|
|
||
| [tasks."build:storybook"] | ||
| description = "Build Storybook" | ||
| run = "mise run build:storybook:base" | ||
| sources = ["src/**/*.{ts,tsx,stories.tsx}", ".storybook/**/*"] | ||
| outputs = ["{{ vars.storybook_out_dir }}/**/*"] | ||
|
|
||
| [tasks."build"] | ||
| description = "Run all build tasks" | ||
| run = [{ task = "build:webapp" }, { task = "build:storybook" }] | ||
|
|
||
| [tasks."build:gh-pages"] | ||
| description = "Prepare deployment artifacts (combine builds for GitHub Pages)" | ||
| run = [ | ||
| "mise run build:webapp:base {{ vars.gh_pages_out_dir }} /modern-stack/", | ||
| "mise run build:storybook:base {{ vars.gh_pages_out_dir }}/storybook /modern-stack/storybook", | ||
| ] | ||
| sources = ["src/**/*.{ts,tsx}", "index.html", "vite.config.ts", ".storybook/**/*"] | ||
| outputs = ["{{ vars.gh_pages_out_dir }}/**/*"] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Development tasks | ||
|
|
||
| [vars] | ||
| vite_port = "5173" | ||
| storybook_port = "6006" | ||
|
|
||
| [tasks.dev] | ||
| description = "Start Vite dev server" | ||
| usage = ''' | ||
| flag "-p --port <port>" default="{{ vars.vite_port }}" help="Port for the Vite dev server" | ||
| arg "[rest]" help="Additional arguments to pass to Vite" | ||
| ''' | ||
| run = "vite --port ${usage_port?} ${usage_rest}" | ||
|
|
||
| [tasks.storybook] | ||
| description = "Start Storybook dev server" | ||
| alias = "sb" | ||
| usage = ''' | ||
| flag "-p --port <port>" default="{{ vars.storybook_port }}" help="Port for the Storybook dev server" | ||
| ''' | ||
| run = "storybook dev -p ${usage_port?}" | ||
|
|
||
| [tasks.preview] | ||
| description = "Preview production build" | ||
| depends = ["build:webapp"] | ||
| run = "vite preview" | ||
|
|
||
| [tasks.clean] | ||
| description = "Clean build artifacts and caches" | ||
| run = ["rm -rf .var", "rm -rf node_modules/.vite", "rm -rf coverage"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| [vars] | ||
| panda_outdir = "src/shared/styled-system" | ||
| panda_config = "panda.config.ts" | ||
|
|
||
| [env] | ||
| PANDA_OUTDIR = "{{ vars.panda_outdir }}" | ||
|
|
||
| [tasks."prepare:panda"] | ||
| description = "Run Panda code generation" | ||
| run = "panda codegen" | ||
|
|
||
| sources = ["{{ vars.panda_config }}", "theme/**/*.ts", "components.json"] | ||
| outputs = ["{{ vars.panda_outdir }}/**/*"] | ||
|
|
||
| [tasks."prepare:git-hooks"] | ||
| description = "Install Git hooks" | ||
| run = "lefthook install" | ||
| sources = ["lefthook.yml"] | ||
|
|
||
| [tasks."prepare:local-overrides"] | ||
| description = "Setup local overrides file if not exists" | ||
| run = "if [ ! -f mise.local.toml ]; then sed '/^##/d' .config/mise/conf.d/local.toml > mise.local.toml; fi" | ||
|
|
||
| [tasks.prepare] | ||
| description = "Prepare project" | ||
| run = [ | ||
| { task = "prepare:panda" }, | ||
| { task = "prepare:git-hooks" }, | ||
| { task = "prepare:local-overrides" }, | ||
| ] | ||
|
Guria marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Code quality tasks | ||
|
|
||
| [tasks.format] | ||
| description = "Format code with oxfmt" | ||
| alias = "fmt" | ||
| run = "oxfmt --write ." | ||
|
|
||
| [tasks."format:check"] | ||
| description = "Check code formatting" | ||
| alias = "fmt:check" | ||
| run = "oxfmt --check ." | ||
|
|
||
| [tasks.lint] | ||
| description = "Lint code with oxlint" | ||
| run = "oxlint ." | ||
|
|
||
| [tasks.typecheck] | ||
| description = "Type check with TypeScript" | ||
| alias = "tc" | ||
| run = "tsc -b" | ||
| sources = ["src/**/*.{ts,tsx}", "tsconfig*.json"] | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| [tasks.validate] | ||
| description = "Run all quality checks (format, lint, typecheck, test). Default validation task for LLMs" | ||
| run = [ # | ||
| { task = "prepare" }, | ||
| { task = "format" }, | ||
| { tasks = ["lint", "typecheck", "test:run"] }, | ||
| ] | ||
|
|
||
| [tasks.ci] | ||
| description = "Run all CI checks. No auto-fixes" | ||
| run = [ | ||
| { task = "format:check" }, | ||
| { task = "lint" }, | ||
| { task = "typecheck" }, | ||
| { task = "test:coverage" }, | ||
| { task = "build" }, | ||
| ] | ||
|
Guria marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Testing tasks | ||
|
|
||
| [vars] | ||
| test_timeout = "10000" | ||
|
Guria marked this conversation as resolved.
|
||
| coverage_threshold_lines = "80" | ||
| coverage_threshold_functions = "80" | ||
| coverage_threshold_branches = "75" | ||
| coverage_threshold_statements = "80" | ||
|
|
||
| [env] | ||
| TEST_TIMEOUT = "{{ vars.test_timeout }}" | ||
| COVERAGE_THRESHOLD_LINES = "{{ vars.coverage_threshold_lines }}" | ||
| COVERAGE_THRESHOLD_FUNCTIONS = "{{ vars.coverage_threshold_functions }}" | ||
| COVERAGE_THRESHOLD_BRANCHES = "{{ vars.coverage_threshold_branches }}" | ||
| COVERAGE_THRESHOLD_STATEMENTS = "{{ vars.coverage_threshold_statements }}" | ||
|
|
||
| [tasks.test] | ||
| description = "Run tests in watch mode" | ||
| alias = "t" | ||
| run = "vitest" | ||
|
|
||
| [tasks."test:run"] | ||
| description = "Run tests once" | ||
| alias = "tr" | ||
| run = "vitest run" | ||
|
|
||
| [tasks."test:coverage"] | ||
| description = "Run tests with coverage" | ||
| alias = "tcov" | ||
| run = "vitest run --coverage" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| # Tool versions | ||
| [tools] | ||
| bun = "1.3.6" | ||
| node = "lts" | ||
| jq = "latest" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.