-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.sh
46 lines (37 loc) · 1.01 KB
/
dev.sh
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
nvm install
echo ""
echo "serve_docs Serves the Vuepress documentation for development"
echo ""
echo "build_docs Build the Vuepress documentation to static files"
echo ""
echo "build_package Builds the plugin for distribution via NPM"
echo ""
echo "run_tests Runs the Jest test suite"
echo ""
echo "run_lint Runs Eslint to enforce code style"
echo ""
echo "upload_coverage Uploads the Jest coverage to Codecov.io"
echo ""
echo "netlify_pipeline Runs the necessary commands for the deployment of the documentation on Netlify"
function serve_docs {
pnpx vuepress dev
}
function build_docs {
pnpx vuepress build
}
function build_package {
pnpm run build
}
function run_tests {
pnpx jest --verbose --coverage
}
function run_lint {
pnpx eslint --ext .js .
}
function upload_coverage {
pnpx codecov $@
}
function netlify_pipeline {
npm i -g pnpm
build_package && run_lint && run_tests && upload_coverage && build_docs
}