-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
34 lines (31 loc) · 1.11 KB
/
.pre-commit-config.yaml
File metadata and controls
34 lines (31 loc) · 1.11 KB
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
repos:
- repo: local
hooks:
- id: css-syntax-check
name: CSS syntax check
entry: npx stylelint
language: node
files: \.css$
exclude: \.(min|bundle\.min)\.css$
pass_filenames: true
- id: js-syntax-check
name: JavaScript syntax check
entry: bash -c 'for f in "$@"; do node --check "$f"; done' --
language: system
files: \.js$
pass_filenames: true
# - id: js-minify
# name: JavaScript minify (with sourcemap)
# entry: >
# npx terser production/skilljar-theme-v3.0.js
# -c -m
# -o production/skilljar-theme-v3.0.min.js
# --source-map "filename='skilljar-theme-v3.0.min.js',url='skilljar-theme-v3.0.min.js.map'"
# language: system
# files: ^production/skilljar-theme-v3\.0\.js$
# pass_filenames: false
# - id: stage-minified
# name: Stage minified JS + sourcemap
# entry: sh -c "git add production/skilljar-theme-v3.0.min.js production/skilljar-theme-v3.0.min.js.map"
# language: system
# pass_filenames: false