diff --git a/.editorconfig b/.editorconfig index 4083014..ccb574a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,7 +4,7 @@ root = true # Unix-style newlines with a newline ending every file -[*] +[*.{ts,js}] end_of_line = lf insert_final_newline = true indent_style = space diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b5088b9 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +setup: ## Install packages and polis codebase + git submodule update --init + npm install + +run: ## Run storybook development environment + npm run storybook + +%: + @true + +.PHONY: help + +help: + @echo 'Usage: make ' + @echo + @echo 'where is one of the following:' + @echo + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}' + +.DEFAULT_GOAL := help diff --git a/README.md b/README.md index b0c2221..a5984b5 100644 --- a/README.md +++ b/README.md @@ -27,15 +27,16 @@ Requirements: git checkout https://github.com/CivicTechTO/polis-storybook cd polis-storybook -git submodule init -git submodule update - +git submodule update --init npm install + npm run storybook ``` A browser window will open automatically: http://localhost:6006 +(If you have the `make` command installed, you may run `make` to see the helper tasks it can help you run.) + ## Technologies Used - [**Storybook.**][storybook] A frontend workshop for building UI components and pages in isolation.