Skip to content

Instantly share code, notes, and snippets.

@gbalbuena
Created August 7, 2020 03:48
Show Gist options
  • Save gbalbuena/bb755357ff51f9deccbf1ec442f02691 to your computer and use it in GitHub Desktop.
Save gbalbuena/bb755357ff51f9deccbf1ec442f02691 to your computer and use it in GitHub Desktop.

Revisions

  1. gbalbuena created this gist Aug 7, 2020.
    23 changes: 23 additions & 0 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    clean: ## Clean deps
    @echo "Clean deps and artefacts"
    @npm cache verify

    install: ## Install dependencies
    @echo "Installing Node dependencies"
    @npm ci

    start: ## Run in local
    @echo "Run"
    @npm start

    lint: ## Linting
    @npm run lint

    test:
    @npm test

    help: ## Help
    @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

    .PHONY: help
    .DEFAULT_GOAL := help
    23 changes: 23 additions & 0 deletions Makefile yarn
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    clean: ## Clean deps
    @echo "Clean deps and artefacts"
    @npx lerna clean --yes

    install: ## Install dependencies
    @echo "Installing Node dependencies"
    @yarn install --frozen-lockfile

    start: ## Run in local
    @echo "Running server in local"
    @yarn start

    lint: ## Linting
    @yarn lint

    test:
    @yarn test

    help: ## Help
    @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

    .PHONY: help
    .DEFAULT_GOAL := help