forked from frintjs/frint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
85 lines (66 loc) · 1.83 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
FROM_TAG := ""
TO_TAG := ""
GITHUB_API_TOKEN := ""
##
# Releases
release:
npm run dist
./node_modules/.bin/lerna publish --force-publish=*
release-canary:
npm run dist
./node_modules/.bin/lerna publish --canary
##
# Changelog
changelog:
git checkout master
git pull origin master
GITHUB_AUTH=$(GITHUB_API_TOKEN) ./node_modules/.bin/lerna-changelog --tag-from $(FROM_TAG) --tag-to $(TO_TAG)
push-changelog:
git checkout master
git pull origin master
git add CHANGELOG.md
git commit -m 'changelog updated.'
git push origin master
##
# Packages
list-packages:
./node_modules/.bin/lerna ls
list-updated:
./node_modules/.bin/lerna updated
##
# Site
site-fetch-contributors:
GITHUB_API_TOKEN=$(GITHUB_API_TOKEN) node ./site/scripts/fetch-contributors.js
site-build:
node ./site/scripts/build-content.js
mkdir -p ./_site/css
./node_modules/.bin/node-sass --include-path ./node_modules ./site/assets/css/main.scss ./_site/css/site.css
mkdir -p ./_site/js
./node_modules/.bin/babel ./site/assets/js --out-dir ./_site/js
cp -rf ./site/assets/img ./_site/img
cp -rf ./packages/frint*/dist ./_site/js
site-watch:
make site-build
fswatch -or './site' | xargs -I{} make site-build
site-serve-only:
echo "Starting server at http://localhost:6001"
./node_modules/.bin/live-server --port=6001 ./_site/
site-serve:
make site-build
make site-serve-only
site-publish:
npm run bootstrap
npm run dist
rm -rf ./_site
make site-build
make site-publish-only
site-publish-only:
rm -rf ./_site/.git
cp -f CNAME ./_site/CNAME
(cd ./_site && git init)
(cd ./_site && git commit --allow-empty -m 'update site')
(cd ./_site && git checkout -b gh-pages)
(cd ./_site && touch .nojekyll)
(cd ./_site && git add .)
(cd ./_site && git commit -am 'update site')
(cd ./_site && git push git@github.com:Travix-International/frint gh-pages --force)