Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deebloo/wireit-recipes
https://github.com/deebloo/wireit-recipes
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/deebloo/wireit-recipes
- Owner: deebloo
- Created: 2024-01-12T14:02:38.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-01-16T21:08:34.000Z (12 months ago)
- Last Synced: 2024-10-31T16:59:37.860Z (2 months ago)
- Size: 8.79 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wireit Recipes
This document is a place to write down and share different [wireit](https://github.com/google/wireit) configurations
## TypeScript
```JSON
{
"script": {
"tsc": "wireit"
},
"wireit": {
"tsc": {
"command": "tsc --build --pretty",
"clean": "if-file-deleted",
"files": [
"src/**/*.{ts,tsx}",
"tsconfig.json"
],
"output": [
"target/**",
"tsconfig.tsbuildinfo"
]
}
}
}
```## Jest
Jest has an option to generate an output file when it runs tests.
Using that file as an output for a tasks means we can have effective caching of our test command.
If an output isn't defined, but files is, we will cache things we don't intend if we pass arguments to jest.```JSON
{
"script": {
"test": "wireit"
},
"wireit": {
"test": {
"command": "jest --json --outputFile jestresults.json",
"files": [
"src/**"
],
"output": [
"jestresults.json"
]
}
}
}
```## Copying Files
For cross platform copy
```bash
npm i copyfiles
``````JSON
{
"wireit": {
"cp:css": {
"command": "copyfiles -u 1 \"src/**/*.css\" target",
"clean": "if-file-deleted",
"files": [
"src/**/*.css"
],
"output": [
"target/**/*.css"
]
}
}
}
```