forked from google/wireit
/
schema.json
54 lines (54 loc) · 4.45 KB
/
schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "wireit contributions to package.json",
"additionalProperties": true,
"properties": {
"wireit": {
"additionalProperties": {
"markdownDescription": "The wireit config for the npm script with this name.\n\nThe npm script should just run `wireit` with no args and its actual command should be put in the `command` property of this object.\n\nFor more info see: https://github.com/google/wireit#cleaning-output",
"additionalProperties": true,
"properties": {
"clean": {
"markdownDescription": "By default, `output` files are deleted before the command is run.\n\nSet `clean` to false to prevent this.\n\nSome commands, like `tsc --build`, have their own incremental run logic and only write those output files that have changed. In that case, it can be beneficial to only delete output files when one of the input files has been deleted. In that case, set `clean` to \"if-file-deleted\".\n\nFor more info see: https://github.com/google/wireit#cleaning-output",
"enum": [true, false, "if-file-deleted"]
},
"command": {
"markdownDescription": "The command to run.\n\nThis is a shell command that will be executed, with all binaries from npm dependencies and devDependencies available.\n\nFor example:\n\n```json\n\"command\": \"tsc\"\n```\n\nFor more info, see https://docs.npmjs.com/cli/v8/using-npm/scripts#environment",
"type": "string"
},
"dependencies": {
"markdownDescription": "Other npm scripts that will run before this one.\n\nThese scripts do not have to use wireit.\n\nDependencies can refer to scripts in other npm packages by using a relative path with the syntax `<relative-path>:<script-name>`. All cross-package dependencies should start with a `\".\"`. Cross-package dependencies work well for npm workspaces, as well as in other kinds of monorepos.\n\nFor example:\n\n```json\n\"dependencies\": [\n \"build\",\n \"./packages/foo:build\"\n]\n```\n\nFor more info, see https://github.com/google/wireit#dependencies",
"items": {
"type": "string"
},
"type": "array"
},
"files": {
"markdownDescription": "The files that this script depends on.\n\nThese are the files that are watched when run with the `watch` argument. They are also used to determine if a script is stale or if its files and dependencies haven't changed and execution can be skipped.\n\nDon't specify `files` unless the array of files (and `dependencies`) are the only things that this script depends on. For example, a script that fetches data over the internet should not have a files array.\n\nThis should be a list of package-relative paths to files, or glob patterns. See https://github.com/google/wireit#glob-patterns for more info on the format of glob patterns.\n\nFor example:\n\n```json\n\"files\": [\n \"src/**/*.ts\"\n]\n```",
"items": {
"type": "string"
},
"type": "array"
},
"output": {
"markdownDescription": "The files that this script writes.\n\nThese are the files that are deleted before the script is executed (set `clean` to customize this behavior), and these are the files that are cached if `files` is specified.\n\nThis should be a list of package-relative paths to files, or glob patterns. See https://github.com/google/wireit#glob-patterns for more info on the format of glob patterns.\n\nFor example:\n\n```json\n\"output\": [\n \"lib/**/*\",\n \"!lib/bundle.js\"\n]\n```",
"items": {
"type": "string"
},
"type": "array"
},
"packageLocks": {
"markdownDescription": "By default, Wireit automatically treats package-lock.json files in the package directory, plus all parent directories, as input files. This is useful because installing or upgrading your dependencies can affect the behavior of your scripts, so it's important to re-run them whenever your dependencies change.\n\nIf you are using an alternative package manager instead of npm, then your package lock files might be named something else.\n\nFor more info, see: https://github.com/google/wireit#package-locks",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"type": "object"
}
},
"type": "object"
}