-
Notifications
You must be signed in to change notification settings - Fork 43
/
Makefile
102 lines (68 loc) · 2.19 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
##############
## Please note
##############
# First, run ``make install``.
# After that you have through Makefile extension all the other base targets available.
# If you want to release on GitHub, make sure to have a .env file with a GITHUB_TOKEN.
# Also see:
# https://github.com/settings/tokens
# and https://github.com/release-it/release-it/blob/master/docs/github-releases.md#automated
# Include base Makefile
-include node_modules/@patternslib/dev/Makefile
# Define the GITHUB_TOKEN in the .env file for usage with release-it.
-include .env
export
PEGJS ?= npx pegjs
SASS ?= npx sass
YARN ?= npx yarn
PACKAGE_NAME = "patternslib"
all:: bundle css
.PHONY: install
stamp-yarn install:
$(YARN) install
# Install pre commit hook
$(YARN) husky install
# We have checked in the .husky files, so no need to add the commitlint hook again.
# $(YARN) husky add .husky/commit-msg "npx yarn commitlint --edit $1"
touch stamp-yarn
.PHONY: watch
watch: stamp-yarn
$(YARN) watch
.PHONY: build
build: bundle css
.PHONY: depends-parser
depends-parser: stamp-yarn
$(PEGJS) -O size -f es src/lib/depends_parse.pegjs
# Unlink any linked dependencies before building a bundle.
bundle-pre:
-$(YARN) unlink @patternslib/dev
-$(YARN) unlink @patternslib/pat-content-mirror
-$(YARN) unlink @patternslib/pat-doclock
-$(YARN) unlink @patternslib/pat-shopping-cart
-$(YARN) unlink @patternslib/pat-sortable-table
-$(YARN) unlink @patternslib/pat-tiptap
-$(YARN) unlink @patternslib/pat-upload
$(YARN) install --force
.PHONY: css
css:
@$(SASS) -I style -I _sass -I . _sass/_patterns.scss style/patterns.css
# Update patterns-site
Patterns-site/Makefile:
git clone git@github.com:Patternslib/Patterns-site.git
.PHONY: update-patternslib-site
update-patternslib-site: Patterns-site/Makefile
# something
cd Patterns-site && git pull && make update-patternslib && git push
# Overrides release + Update https://patternslib.com
.PHONY: release-major
release-major:
make LEVEL=major release
make update-patternslib-site
.PHONY: release-minor
release-minor:
make LEVEL=minor release
make update-patternslib-site
.PHONY: release-patch
release-patch:
make LEVEL=patch release
make update-patternslib-site