dist:
	make build
	make test
	make lint

sync-dev:
	make build
	cp -r lib/* ../skypager/node_modules/skypager-project-bundler/lib

.PHONY: dist

dev:
	@mkdir -p dist/
	@webpack --watch --display-chunks --color --config src/internals/webpack/library.development.babel.js

build: clean
	@mkdir -p dist/
	@babel -d lib src
	#@webpack --display-chunks --color --config src/internals/webpack/library.development.babel.js

lint:
	eslint src/ --ignore-path .gitignore --ignore-path .eslintignore

test:
	mocha --require babel-register --require test/setup.js test/**/*.spec.js

test-watch:
	mocha --watch --require babel-register --require test/setup.js test/**/*.spec.js

clean:
	@rm -rf dist/

release: build
	git add . -A
	npm version patch
	npm publish

.PHONY: test
