DIR := $(shell pwd)
COMPONENTS := ${DIR}/src/components

default: 
	sudo npm install -g yarn && yarn
	make hooks
	make test
	npm run build
	npm run bundle

dev: 
	make hooks
	yarn && npm run storybook

hooks:
	test -d $(DIR)/.git/hooks || mkdir $(DIR)/.git/hooks
	cp $(DIR)/.bin/hooks/* $(DIR)/.git/hooks
	chmod +x $(DIR)/.git/hooks/*

pre_push:
	npm run bundle
	make test

post_merge:
	yarn
	make hooks

test: 
	npm run test

new:
	mkdir $(COMPONENTS)/$(name)
	cp -a $(DIR)/examples/MockComponent/. $(COMPONENTS)/$(name)/
	mv $(COMPONENTS)/$(name)/Component.stories.tsx $(COMPONENTS)/$(name)/$(name).stories.tsx 
	