Skip to content

Commit

Permalink
refactor: rename semantic-release config file
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadnassri committed Sep 3, 2023
1 parent 42bb40c commit 3479af9
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 17 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/template-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ files:
- "!docs/README.md"
- "!colophon.yml"
- "!package*.json"
- "!.github/test-matrix.json"
- "!.github/matrix-*.json"
- "!**/template-sync.yml"
- "!.github/dependabot.yml"
- "!.github/workflows/*.yml"
Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ node_modules
.editorconfig
.github
.pandoc.yml
.semantic.json
.release.json
colophon.yml
docker-compose.yml
Makefile
Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ NPMRC := $(shell npm config get userconfig)
pull: ## pull latest containers
@docker compose pull

readme: ## pull latest containers
readme: ## generate root README.md
@docker compose run --rm readme

lint: ## run super-linter
@docker compose run --rm lint

install: ## install all dependencies
@docker compose run --rm -e NPM_TOKEN=$(NPM_TOKEN) -e GITHUB_TOKEN=$(GITHUB_TOKEN) -v $(NPMRC):/root/.npmrc app install
@docker compose run --rm app install

test: ## run all npm tests
@docker compose --profile test up
@docker compose run --rm app test

shell: ## start the container shell
@docker compose run --rm --entrypoint /bin/sh app

clean: ## remove running containers, volumes, node_modules & anything else
@docker compose rm --force -v
@docker compose --profile test down
@rm -rf node_modules coverage .nyc_output
clean: ## delete containers, images, volumes, node_modules
@docker compose run --rm --entrypoint "rm -rf node_modules" app
@docker compose rm --stop --force --volumes
@docker compose down --remove-orphans --volumes --rmi local

# Utility methods
## Help: https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
Expand All @@ -38,4 +38,4 @@ help: ## display this help
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)

.DEFAULT_GOAL := help
.PHONY: help all clean test coverage
.PHONY: help all clean test
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ services:
profiles: ["app"]
image: node:latest
working_dir: /usr/src/lib
entrypoint: npm --no-update-notifier --no-fund --no-audit
command: start
entrypoint: npm
tty: true
volumes:
- ./:/usr/src/lib
environment:
NODE_ENV: test
NPM_CONFIG_UPDATE_NOTIFIER: false
NPM_CONFIG_FUND: false
NPM_CONFIG_AUDIT: false

test-command:
extends: app
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "0.0.0-semantically-released",
"name": "@ahmadnassri/template-lib",
"name": "@ahmadnassri/template-node-lib",
"description": "node library project template",
"author": "Ahmad Nassri <[email protected]> (https://www.ahmadnassri.com)",
"homepage": "https://github.com/ahmadnassri/template-node-lib",
Expand All @@ -22,7 +22,7 @@
"library"
],
"engines": {
"node": ">=14"
"node": ">=18"
},
"files": [
"src"
Expand Down
6 changes: 3 additions & 3 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { test } = require('tap')
const { test } = require('node:test')
const assert = require('node:assert')

test('example', assert => {
assert.plan(1)
test('example', () => {
assert.ok(true)
})

0 comments on commit 3479af9

Please sign in to comment.