forked from adobe/react-spectrum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
94 lines (66 loc) · 3.03 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
.PHONY: clean test lint build
SHELL := /bin/bash
PATH := ./node_modules/.bin:$(PATH)
all: node_modules
adobe_setup:
mkdir packages/dev/v2-test-deps
cp scripts/v2-package.json packages/dev/v2-test-deps/package.json
node_modules: package.json
yarn install
touch $@
run_chromatic:
NODE_ENV=storybook start-storybook -p 9004 --ci -c ".chromatic"
clean:
yarn clean:icons
rm -rf dist public src/dist
clean_all:
$(MAKE) clean
$(MAKE) clean_node_modules
clean_node_modules:
rm -rf node_modules
rm -rf packages/*/*/node_modules
packages/@spectrum-icons/workflow/src: packages/@spectrum-icons/workflow/package.json
yarn workspace @spectrum-icons/workflow make-icons
touch $@
packages/@spectrum-icons/workflow/%.js: packages/@spectrum-icons/workflow/src/%.tsx
yarn workspace @spectrum-icons/workflow build-icons
touch $@
workflow-icons: $(addprefix packages/@spectrum-icons/workflow/, $(notdir $(addsuffix .js, $(basename $(wildcard packages/@spectrum-icons/workflow/src/*.tsx)))))
packages/@spectrum-icons/color/src: packages/@spectrum-icons/color/package.json
yarn workspace @spectrum-icons/color make-icons
packages/@spectrum-icons/color/%.js: packages/@spectrum-icons/color/src/%.tsx
yarn workspace @spectrum-icons/color build-icons
color-icons: $(addprefix packages/@spectrum-icons/color/, $(notdir $(addsuffix .js, $(basename $(wildcard packages/@spectrum-icons/color/src/*.tsx)))))
packages/@spectrum-icons/ui/src: packages/@spectrum-icons/ui/package.json
yarn workspace @spectrum-icons/ui make-icons
touch $@
packages/@spectrum-icons/ui/%.js: packages/@spectrum-icons/ui/src/%.tsx
yarn workspace @spectrum-icons/ui build-icons
ui-icons: packages/@spectrum-icons/ui/src $(addprefix packages/@spectrum-icons/ui/, $(notdir $(addsuffix .js, $(basename $(wildcard packages/@spectrum-icons/ui/src/*.tsx)))))
packages/@spectrum-icons/illustrations/%.js: packages/@spectrum-icons/illustrations/src/%.tsx
yarn workspace @spectrum-icons/illustrations build-icons
illustrations: packages/@spectrum-icons/illustrations/src $(addprefix packages/@spectrum-icons/illustrations/, $(notdir $(addsuffix .js, $(basename $(wildcard packages/@spectrum-icons/illustrations/src/*.tsx)))))
icons: packages/@spectrum-icons/workflow/src packages/@spectrum-icons/color/src packages/@spectrum-icons/ui/src packages/@spectrum-icons/illustrations/src
@$(MAKE) workflow-icons
@$(MAKE) color-icons
@$(MAKE) ui-icons
@$(MAKE) illustrations
storybook:
NODE_ENV=production yarn build:storybook
storybook-17:
yarn build:storybook-17
# for now doesn't have deploy since v3 doesn't have a place for docs and stuff yet
ci:
$(MAKE) publish
publish: build
yarn publish
publish-nightly: build
yarn publish:nightly
build:
parcel build packages/@react-{spectrum,aria,stately}/*/ packages/@internationalized/*/ --no-minify
website:
yarn build:docs --public-url /reactspectrum/$$(git rev-parse HEAD)/docs --dist-dir dist/$$(git rev-parse HEAD)/docs
website-production:
node scripts/buildWebsite.js
cp packages/dev/docs/pages/robots.txt dist/production/docs/robots.txt
node scripts/brotli.js