-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to let addons generate taskfile sections (#6)
* Add ability to let addons generate taskfile sections * Add first part of the docker compose addon generation * Use template parser for cleaner imports of shells scripts * Finish docker compose rendering * Add checkbox example for adding the development proxy * Add contirubtor avatars to the readme * Finalize development proxy setup * Add Taskfile git addon * Update readme to point more to the online generator * Fix linting * Add typescript types check to linting * Fix linting task names and descriptions * Update site icon * Fix some string coversion issues * Fix linting issues
- Loading branch information
Showing
59 changed files
with
1,068 additions
and
695 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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 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,44 +1,28 @@ | ||
# Taskfile | ||
# Taskfile ([TaskfileGenerator.com](https://taskfilegenerator.com)) | ||
|
||
A `./Taskfile` is a task runner in plain and easy [Bash](https://nl.wikipedia.org/wiki/Bash). It | ||
adds a list of available tasks to your project. | ||
A `./Taskfile` is a task runner in plain and easy [Bash](https://nl.wikipedia.org/wiki/Bash). It adds a list of | ||
available tasks to your project. | ||
|
||
![CLI Taskfile preview](./images/cli-preview.gif) | ||
Generate your own Taskfile at [TaskfileGenerator.com](https://taskfilegenerator.com). | ||
|
||
## Why | ||
|
||
- Works on any OS (any bash terminal) | ||
- A uniform way to run your projects | ||
- Very easy to use | ||
- Automate your most common tasks (updating, starting, building, etc...) | ||
- Easy to understand and maintain | ||
|
||
# Create your own taskfile | ||
|
||
This project gives you a `Taskfile` base, and gives you a collection of usefull tasks to help out on | ||
your project. | ||
[![CLI Taskfile preview](./images/cli-preview.gif)](https://taskfilegenerator.com) | ||
|
||
- [The Taskfile base](./taskfile-base.md) | ||
|
||
We strongly recommend that your project uses a project section containing a `init` and a `update` | ||
task. Check out our example: | ||
|
||
- [Project section](./section/project.md) | ||
|
||
## Usefull tasks | ||
## Why | ||
|
||
Check out the following sections for tasks that could be helpfull for your project's Taskfile: | ||
- Works on any OS (any bash terminal) | ||
- A uniform way to run your projects | ||
- Very easy to use | ||
- Automate your most common tasks (updating, starting, building, etc...) | ||
- Easy to understand and maintain | ||
- Automatically generated list of available task | ||
|
||
- [Docker](./section/docker.md) | ||
- [GitHub](./section/github.md) | ||
- [GitLab](./section/gitlab.md) | ||
## Credits | ||
|
||
# Credits | ||
This Taskfile setup is based on [Adrian Cooney's Taskfile](https://github.com/adriancooney/Taskfile) and is widely | ||
adopted by [Enrise](https://enrise.com) in our modified flavour. | ||
|
||
This Taskfile setup is based on | ||
[Adrian Cooney's Taskfile](https://github.com/adriancooney/Taskfile). | ||
## Contributors | ||
|
||
# Contribute | ||
A big thanks to all the contributors of Taskfile! | ||
|
||
Feel free to add your own Taskfile tasks via a PR. The more usefull tasks, the easier we make the | ||
life of other developers. | ||
![contirubtor avatars](https://contrib.rocks/image?repo=enrise/taskfile) |
This file contains 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 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,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Make the shell script user-interactive | ||
exec < /dev/tty | ||
|
||
# Run pre-commit action from the Taskfile | ||
./Taskfile pre-commit |
This file contains 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 @@ | ||
.idea/ | ||
.next/ | ||
.github/ | ||
*.yml | ||
out/ |
File renamed without changes.
This file contains 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,68 @@ | ||
import reactPlugin from 'eslint-plugin-react'; | ||
import reactHooksPlugin from 'eslint-plugin-react-hooks'; | ||
|
||
import nextPlugin from '@next/eslint-plugin-next'; | ||
import typescriptPlugin from '@typescript-eslint/eslint-plugin'; | ||
import typescriptParser from '@typescript-eslint/parser'; | ||
|
||
const projectRules = { | ||
'@next/next/no-img-element': 'off', | ||
'linebreak-style': ['error', 'unix'], | ||
'react/jsx-pascal-case': ['error'], | ||
'react/button-has-type': ['error'], | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_', | ||
caughtErrorsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
}, | ||
], | ||
}; | ||
|
||
export default [ | ||
{ | ||
plugins: { | ||
'@typescript-eslint': typescriptPlugin, | ||
}, | ||
languageOptions: { | ||
parser: typescriptParser, | ||
parserOptions: { | ||
warnOnUnsupportedTypeScriptVersion: false, | ||
}, | ||
}, | ||
rules: { | ||
...typescriptPlugin.configs.recommended.rules, | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/explicit-function-return-type': [ | ||
'warn', | ||
{ | ||
allowedNames: ['Page', 'generateMetadata', 'Layout'], | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
files: ['**/*.{ts,tsx}'], | ||
plugins: { | ||
react: reactPlugin, | ||
'react-hooks': reactHooksPlugin, | ||
'@next/next': nextPlugin, | ||
}, | ||
rules: { | ||
...reactPlugin.configs['jsx-runtime'].rules, | ||
// ...hooksPlugin.configs.recommended.rules, | ||
...nextPlugin.configs.recommended.rules, | ||
...nextPlugin.configs['core-web-vitals'].rules, | ||
...projectRules, | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
}, | ||
{ | ||
ignores: ['.next/', 'out/'], | ||
}, | ||
]; |
This file contains 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,23 @@ | ||
/* eslint-disable @typescript-eslint/explicit-function-return-type */ | ||
|
||
const prettier = | ||
'prettier --config dev/linting/.prettierrc.json --ignore-path dev/linting/.prettierignore --write --list-different'; | ||
|
||
const config = { | ||
// ============================== | ||
// Frontend specific | ||
// ============================== | ||
'*.{ts,tsx}': [ | ||
// tsc runs for all files instead of only the edited ones | ||
() => 'tsc --noEmit --project . --pretty', | ||
'eslint --config dev/linting/eslint.config.mjs', | ||
prettier, | ||
], | ||
|
||
// ============================== | ||
// Global files | ||
// ============================== | ||
'*.{json,css,md,html}': [prettier], | ||
}; | ||
|
||
export default config; |
This file contains 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,15 +1,15 @@ | ||
import type { NextConfig } from "next"; | ||
import type { NextConfig } from 'next'; | ||
|
||
const nextConfig: NextConfig = { | ||
output: 'export', | ||
webpack: (config) => { | ||
config.module.rules.push({ | ||
test: /\.txt$/i, | ||
test: /\.(txt|sh)$/i, | ||
use: 'raw-loader', | ||
}); | ||
|
||
return config; | ||
} | ||
}, | ||
}; | ||
|
||
export default nextConfig; |
Oops, something went wrong.