-
Notifications
You must be signed in to change notification settings - Fork 1
/
package.json
130 lines (130 loc) · 5.08 KB
/
package.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
{
"name": "website-template",
"scripts": {
"prepare": "if [ \"$taito_mode\" != 'ci' ]; then husky install; fi",
"install-ci": "echo '# No additional dependencies need to be installed in ci mode'",
"install-dev": "echo '# Installing all libraries on host for code editor support. TODO how to minimize as --only=dev affects devDepencies also?' && npm-run-all install-all",
"install-all": "npm-run-all -c install-all:www",
"install-all:www": "echo www libs... && cd www && (mkdir -p node_modules && npm install --no-save || echo WARNING: Some libs failed to install) && if [ -d ./site ]; then echo site libs... && cd site && mkdir -p .cache && mkdir -p public && (mkdir -p node_modules && npm install --no-save || echo WARNING: Some libs failed to install); fi",
"taito-init": "taito -z ${taito_options} init:${taito_env}",
"taito-init:clean": "taito -z ${taito_options} init:${taito_env} --clean",
"taito-init:local:clean": "npm-run-all taito-init:clean",
"info:local": "cat docker-compose.yaml | grep '# SHOW ON INFO'",
"info": "yes | taito ${taito_options} secret show:${taito_env} basic-auth",
"lint": "echo Running lint locally && npm-run-all --parallel lint:www",
"lint:www": "cd www && npm-run-all lint",
"unit": "echo Running unit tests locally && npm-run-all --parallel unit:www",
"unit:www": "cd www && npm-run-all unit",
"test": "npm-run-all test:www",
"test:www": "taito ${taito_options} util-test:www:${taito_env}",
"_dep-check_comment": "TODO how to pass -u argument from dep-check to dep-check:TARGET?",
"dep-check": "npm run \"dep-check:root {@}\" \"dep-check:www {@}\" -- ",
"dep-check:root": "npm run _dep-check-script -- . ",
"dep-check:www": "npm run _dep-check-script -- www ",
"dep-check-www-site": "npm run _dep-check-script -- www/site ",
"_dep-check-script": "sh -c 'echo --- ${0} --- && cd ${0} && (npm-check ${@} || :) && echo && echo \"NOTE: Many of the devDependencies and ~ references are actually in use even if reported unused. But all unused dependencies can usually be removed from package.json.\" && echo' ",
"size-check": "npm run \"size-check:www {@}\" -- ",
"size-check:www": "cd www && echo --- www --- && npm run analyze -- ",
"project-show": "cat PROJECT.md | sed -n -e '/^## Contacts.*$/,/^#.*$/{ /^## Contacts.*$/d; /^#.*$/d; p; }'",
"docs": "echo TODO: generate docs in package.json",
"scan": "echo 'Linting is executed in Dockerfiles during build' && echo 'TODO: execute code analysis here?'",
"precommit:branch": "if git-branch-is -q test || git-branch-is -q stag || git-branch-is -q master; then echo 'ERROR: You cannot commit changes directly to this environment branch. Only fast-forward merge is allowed.' && echo && exit 1; fi",
"precommit:lint": "echo 'SKIP: Skipping linting on commit since we are already continuously linting during development.'",
"types": "if [ -f .flowconfig ]; then flow; elif [ -f tsconfig.json ]; then echo TODO run typescript; fi",
"disabled-types": "echo flow/typescript check disabled on prepush",
"husky:commit-msg": "commitlint --edit",
"husky:pre-commit": "if [ \"$taito_mode\" != 'ci' ]; then npm-run-all precommit:branch precommit:lint; fi",
"husky:pre-push": "if [ \"$taito_mode\" != 'ci' ]; then npm-run-all --parallel lint disabled-types unit; fi",
"release-pre:prod": "semantic-release --dry-run",
"release-post:prod": "semantic-release --no-ci"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
],
"rules": {
"type-enum": [
2,
"always",
[
"wip",
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"revert",
"build",
"ci",
"chore"
]
]
}
},
"release": {
"npmPublish": false,
"analyzeCommits": {
"preset": "angular",
"releaseRules": [
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "style",
"release": "patch"
},
{
"type": "refactor",
"release": "patch"
},
{
"type": "perf",
"release": "patch"
},
{
"type": "test",
"release": "patch"
},
{
"type": "revert",
"release": "patch"
},
{
"type": "build",
"release": "patch"
},
{
"type": "ci",
"release": "patch"
},
{
"type": "chore",
"release": "patch"
}
]
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/TaitoUnited/website-template.git"
},
"devDependencies": {
"@commitlint/cli": "~17.1.2",
"@commitlint/config-conventional": "~17.1.0",
"git-branch-is": "~4.0.0",
"husky": "~8.0.1",
"npm-run-all": "~4.1.5",
"semantic-release": "~19.0.2"
}
}