Skip to content

Commit

Permalink
feat: initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
jwbennet committed Jan 22, 2024
0 parents commit 16b6820
Show file tree
Hide file tree
Showing 9 changed files with 118 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
extends:
- "@commitlint/config-conventional"

rules:
header-max-length: [2, "always", 100]
33 changes: 33 additions & 0 deletions .devcontainer/devcontainer.json.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
{
"name": "{{project_name}}",
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers-contrib/features/copier": {
"version": "9.1.1",
},
"ghcr.io/devcontainers-contrib/features/go-task": {
"version": "3.33.1",
},
"ghcr.io/devcontainers-contrib/features/mkdocs": {
"version": "1.5.3",
},
"ghcr.io/devcontainers/features/node": {
"version": "20.11.0",
},
"ghcr.io/devcontainers-contrib/features/pre-commit": {
"version": "3.6.0",
},
"ghcr.io/devcontainers/features/python": {
"version": "3.12.1",
},
},

"postCreateCommand": "task setup",

"customizations": {
"vscode": {
"extensions": ["EditorConfig.EditorConfig", "redhat.vscode-yaml"],
},
},
}
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# top-most editorconfig file
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

[.*rc]
indent_size = 2

[*.{jinja,json,yml,yaml}]
indent_size = 2
1 change: 1 addition & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"*.{json,lintstagedrc,yml,yaml}": "prettier --write"
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
- repo: https://github.com/jwbennet/lint-staged-pre-commit-hook
rev: v1.0.0
hooks:
- id: lint-staged
stages: [pre-commit]
additional_dependencies: ["prettier"]
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.11.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]
16 changes: 16 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: "3"

tasks:
docs:
desc: Start a server which serves the project documentation
cmds:
- mkdocs serve
setup:
desc: Install dependencies and setup the project
cmds:
- pre-commit install --hook-type pre-commit --hook-type commit-msg
default:
cmds:
- task --list

silent: true
4 changes: 4 additions & 0 deletions copier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Questions
project_name:
type: str
help: Enter your project name.
29 changes: 29 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Introduction

## Commands

This project uses a [Taskfile](https://taskfile.dev/) and all commands are summarized by executing it with `task`.

## Project layout

.devcontainer/
.devcontainer.json # Provides configuration for creating a development environment with all necessary tooling installed.
docs/
index.md # The documentation homepage.
... # Other project documentation Markdown and assets.
.commitlintrc # Configures linting for commit messages.
.editorconfig # Configures whitespace handling for IDEs.
.lintstagedrc # Configures linting for various file types before Git commit.
.pre-commit-config.yaml # Configures project Git hooks.
mkdocs.yml # Configures how the project documentation is built and deployed.
Taskfile.yaml # Configures a task runner which provides shortcuts for project commands.

## Tooling Documentation

* [commitlint](https://commitlint.js.org/) - Linting for commit messages
* [Dev Containers](https://containers.dev/implementors/json_reference/) - Development environment in a container
* [EditorConfig](https://editorconfig.org/) - IDE whitespace configuration
* [lint-staged](https://www.npmjs.com/package/lint-staged?activeTab=readme#configuration) - Linting for project files
* [MkDocs](https://www.mkdocs.org/user-guide/) - Project documentation
* [pre-commit](https://pre-commit.com/#usage) - Git hooks
* [Taskfile](https://taskfile.dev/usage/) - Project task runner
1 change: 1 addition & 0 deletions mkdocs.yml.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
site_name: "{{project_name}}"

0 comments on commit 16b6820

Please sign in to comment.