UNPKG

1.03 kBPlain TextView Raw
1BUILD_CMD := ./node_modules/.bin/babel ./src -d ./lib --ignore 'test' --presets latest,stage-0
2TEST_CMD := ./node_modules/.bin/ava test/plugin.spec.js
3
4build_es6:
5 @$(BUILD_CMD)
6
7ci:
8 @$(BUILD_CMD) --watch
9
10clean:
11 @rm -rf ./lib
12 @rm -rf ./test/tmp
13
14build: clean build_es6
15
16lint:
17 @node_modules/.bin/eslint src
18
19unit_test: build
20 @$(TEST_CMD)
21
22integration_test: build
23 @cd examples && npm install && npm t && npm run webpack
24
25test: lint build unit_test integration_test
26
27major:
28 npm version major
29
30minor:
31 npm version minor
32
33patch:
34 npm version patch
35
36changelog.template.ejs:
37 @echo "## x.x.x\n\n<% commits.forEach(function(commit) { -%>\n* <%= commit.title %>\n<% }) -%>" > changelog.template.ejs
38
39changelog: changelog.template.ejs
40 @touch CHANGELOG.md
41 @git-release-notes $$(git describe --abbrev=0)..HEAD $< | cat - CHANGELOG.md >> CHANGELOG.md.new
42 @mv CHANGELOG.md{.new,}
43 @rm changelog.template.ejs
44 @echo "Added changes since $$(git describe --abbrev=0) to CHANGELOG.md"
45
46.PHONY: clean dev lint examples test major minor patch