Skip to content

strg-at/template-vue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pre-commit taskfile

Project

Short project description

Table of Contents

Code-Style

Getting Started

Prerequisties

Initialize repository

Pre-commit framework need to get initialized.

task pre-commit:init

Configuration

Preparation

All changes require a PR and review. Create a new branch and reference a Jira ticket, f.e.

git switch -c feature/INPRO-1-configure-resource

Development

Running npm commands in Docker

All npm commands are run inside a Docker container using the Node.js version specified in .nvmrc. This ensures consistency across environments.

Basic usage

task npm -- <npm_command> [<args>]

Common tasks

  • Start the dev environment (Vite on port 5173):

    task npm:dev
    # or
    task npm -- run dev

    Access at: http://localhost:5173

  • Start Storybook (port 6006):

    task npm:storybook
    # or
    task npm -- run storybook

    Access at: http://localhost:6006

  • Run tests:

    task npm:test
    # or
    task npm -- run test
  • Update snapshots:

    task npm:test:update
    # or
    task npm -- run test:update
  • Build for production:

    task npm:build
    # or
    task npm -- run build
  • Lint with ESLint:

    task npm:lint
    # or
    task npm -- run lint
  • Type-check:

    task npm:type-check
    # or
    task npm -- run type-check

Arbitrary npm commands

You can run any npm command using:

task npm -- <command> [args]

For mapped npm tasks (see below), you can also use:

task npm:<command>

Examples:

# List installed packages
task npm -- ls
# Only works if a mapped task exists:
task npm:ls

# Run a custom script
task npm -- run <script>
# Only works if a mapped task exists:
task npm:run -- <script>

Note: Only mapped npm commands (those defined in the Taskfile) support the task npm:<command> syntax. For all other npm commands, use task npm -- <command> [args].


Code Quality: pre-commit hooks

To check and auto-fix code style and quality using pre-commit hooks, use:

task pre-commit:run

This will run all configured pre-commit hooks (such as linting, formatting, etc.) on your codebase. It ensures your code meets the project's quality standards before committing.


Running npx commands in Docker

To run npx commands inside Docker:

task npx -- <npx_command> [<args>]

Example (upgrade Storybook):

task npx -- storybook@latest upgrade

Other Storybook npx commands:

task npx -- storybook automigrate
task npx -- storybook doctor

These tasks ensure all npm/npx commands run in a consistent Docker environment with the correct Node.js version.

Known Issues

About

vue repo template

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •