Skip to content

update makefile and node packages #1712

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.15.1
18.20.8
15 changes: 15 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"recommendations": [
"EditorConfig.EditorConfig",
"DavidAnson.vscode-markdownlint",
"bungcip.better-toml",
"budparr.language-hugo-vscode",
"stylelint.vscode-stylelint",
"syler.sass-indented",
"csstools.postcss",
"ms-vscode.makefile-tools",
"ms-azuretools.vscode-docker",
"formulahendry.auto-rename-tag",
"formulahendry.auto-close-tag"
]
}
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"url": "http://localhost:1313",
"webRoot": "${workspaceFolder}"
}
]
Expand Down
50 changes: 50 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
// Editor settings
"editor.tabSize": 2,
"editor.detectIndentation": false,
"editor.formatOnSave": true,
// Exclude generated folders from search and file watcher
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/node_modules": true,
"**/app": true,
"**/resources": true,
"**/tmp": true
},
"search.exclude": {
"**/.git": true,
"**/node_modules": true,
"**/yarn.lock": true,
"**/app": true,
"**/resources": true,
"**/tmp": true
},
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true,
"**/app/**": true,
"**/resources/**": true,
"**/tmp/**": true
},
// Markdownlint settings
"markdownlint.config": {
// Settings are inherited from .markdownlint.json
},
// Default formatter for Markdown
"[markdown]": {
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
},
// Hugo settings
"html.format.wrapLineLength": 0,
"html.format.wrapAttributes": "auto",
// SCSS/SASS settings
"[scss]": {
"editor.defaultFormatter": "vscode.css-language-features"
},
"[sass]": {
"editor.defaultFormatter": "vscode.css-language-features"
},
"makefile.configureOnOpen": false
}
36 changes: 27 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,44 +1,62 @@
clean:
ifeq ($(UNAME),Darwin)
SHELL := /opt/local/bin/bash
OS_X := true
else ifneq (,$(wildcard /etc/redhat-release))
OS_RHEL := true
else
OS_DEB := true
SHELL := /bin/bash
endif
Comment on lines +1 to +9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't required under Darwin and other projects with make help I've worked on didn't bother with this or just set SHELL := /bin/bash

.DEFAULT_GOAL := help
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.DEFAULT_GOAL := help

First goal is the default goal, so this to me is redundant.

MAKEFLAGS := --jobs=1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for setting this flag?

## Available commands:
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'

clean: ## Remove generated files and directories.
rm -rf app resources

build: ## Build the site with Hugo and run link check.
build: clean
hugo --minify

make check-links-ci

build-preview: ## Build the site for preview.
build-preview: clean
hugo \
--baseURL $(DEPLOY_PRIME_URL) \
--buildDrafts \
--buildFuture \
--minify

make check-links-ci
# Uncomment the line below if you want to run link checking as part of preview
# make check-links-ci
Comment on lines 31 to +33
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just delete all this as check-links-ci doesn't seem to work with these options.


set-up-link-checker:
set-up-link-checker: ## Set up link checker.
curl https://raw.githubusercontent.com/wjdp/htmltest/master/godownloader.sh | bash

run-link-checker:
run-link-checker: ## Run link checker.
bin/htmltest

check-links-ci: ## Run link checker CI.
check-links-ci: set-up-link-checker run-link-checker

.PHONY: sdkexamples
sdkexamples:
sdkexamples: ## Build SDK examples.
make -C sdkexamples

serve:
serve: ## Serve the site for local development.
hugo server --buildDrafts --buildFuture --bind 0.0.0.0

HUGO_VERSION ?= $(shell grep HUGO_VERSION ./netlify.toml | head -1 | cut -d '"' -f 2)

IMAGE_NAME ?= helm-docs

image:
image: ## Build the Docker image.
docker build --build-arg HUGO_VERSION=$(HUGO_VERSION) -t $(IMAGE_NAME) .

# Extract the target after 'image-run' or default to 'serve'
DOCKER_TARGET = $(if $(filter-out image-run,$(MAKECMDGOALS)),$(filter-out image-run,$(MAKECMDGOALS)),serve)

image-run:
image-run: ## Run the Docker image.
docker run --rm --init -it -p 1313:1313 -v $(PWD):/src $(IMAGE_NAME) $(DOCKER_TARGET)
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
publish = "app"

[build.environment]
HUGO_VERSION = "0.138.0"
HUGO_VERSION = "0.145.0"
HUGO_ENABLEGITINFO = "true"

[context.production.environment]
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"url": "git+https://github.com/helm/helm-www"
},
"devDependencies": {
"autoprefixer": "9.7.4",
"postcss-cli": "7.1.0"
"autoprefixer": "^10.4.21",
"postcss": "^8.0.0",
"postcss-cli": "^11.0.1"
},
"browserslist": [
"> 0.5%",
Expand Down
Loading