-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#39 add makefile with utility targets
- generate audit reports (requires at least node 10) - basic targets to build and serve the theme
- Loading branch information
Showing
3 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,4 @@ jspm_packages | |
# Intellij | ||
.idea/* | ||
*.iml | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
.DEFAULT_GOAL:=build | ||
|
||
.PHONY: gen-audit | ||
gen-audit: gen-audit-severity gen-audit-prod | ||
|
||
.PHONY: result-dir | ||
result-dir: | ||
@mkdir -p tmp | ||
|
||
.PHONY: gen-audit-prod | ||
gen-audit-prod: result-dir | ||
@mkdir -p target | ||
@-npm audit --json --prod 1> target/audit_prod.json | ||
|
||
.PHONY: gen-audit-dev | ||
gen-audit-dev: result-dir | ||
@mkdir -p target | ||
@-npm audit --json --dev 1> target/audit_dev.json | ||
|
||
.PHONY: gen-audit-severity-all | ||
gen-audit-severity-all: gen-audit-dev | ||
@cat target/audit_dev.json | jq '.advisories | with_entries(select(.value.severity == "low"))' 1> target/audit_dev_low.json | ||
@cat target/audit_dev.json | jq '.advisories | with_entries(select(.value.severity == "moderate"))' 1> target/audit_dev_moderate.json | ||
@cat target/audit_dev.json | jq '.advisories | with_entries(select(.value.severity == "high"))' 1> target/audit_dev_high.json | ||
@cat target/audit_dev.json | jq '.advisories | with_entries(select(.value.severity == "critical"))' 1> target/audit_dev_critical.json | ||
|
||
.PHONY: build | ||
build: install | ||
gulp | ||
|
||
.PHONY: serve | ||
serve: install | ||
gulp serve | ||
|
||
.PHONY: install | ||
install: | ||
npm install -g gulp bower | ||
npm install | ||
bower install | ||
npm rebuild node-sass | ||
npm rebuild sharp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters