-
Notifications
You must be signed in to change notification settings - Fork 17
/
run-auto-importers.sh
executable file
·86 lines (76 loc) · 3.38 KB
/
run-auto-importers.sh
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
root_dir=`pwd`
cd $root_dir/scripts/typescript/
yarn
cd node_modules
git clone [email protected]:coingaming/moon-design.git
cd moon-design
git reset --hard HEAD
git pull
npm install -g pnpm
pnpm install
pnpm run build
cd $root_dir/scripts/typescript/
yarn
cd node_modules
git clone [email protected]:coingaming/assets.git
cd assets
git reset --hard HEAD
git pull
npm install -g pnpm
pnpm install
cp $root_dir/.env .env
pnpm run build
export page=$(grep ICON_PAGE_NAME .env | cut -d '=' -f2)
npm run figma --page=$page
cd $root_dir/scripts/typescript/
./node_modules/svgo/bin/svgo --config=./svgo.config.js -f ./node_modules/assets/svg/ageLimit -o ./node_modules/assets/svg/ageLimit
./node_modules/svgo/bin/svgo --config=./svgo.config.js -f ./node_modules/assets/svg/crests -o ./node_modules/assets/svg/crests
./node_modules/svgo/bin/svgo --config=./svgo.config.js -f ./node_modules/assets/svg/currencies -o ./node_modules/assets/svg/currencies
./node_modules/svgo/bin/svgo --config=./svgo.config.js -f ./node_modules/assets/svg/duotones -o ./node_modules/assets/svg/duotones
./node_modules/svgo/bin/svgo --config=./svgo.config.js -f ./node_modules/assets/svg/icons -o ./node_modules/assets/svg/icons
./node_modules/svgo/bin/svgo --config=./svgo.config.js -f ./node_modules/assets/svg/groupIcons -o ./node_modules/assets/svg/groupIcons
./node_modules/svgo/bin/svgo --config=./svgo.config.js -f ./node_modules/assets/svg/logos -o ./node_modules/assets/svg/logos
./node_modules/svgo/bin/svgo --config=./svgo.config.js -f ./node_modules/assets/svg/patterns -o ./node_modules/assets/svg/patterns
./node_modules/svgo/bin/svgo --config=./svgo.config.js -f ./node_modules/assets/svg/$page -o ./node_modules/assets/svg/$page
cd $root_dir
rm -rf lib/moon/assets/age_limit lib/moon/assets/crests lib/moon/assets/currencies
rm -rf lib/moon/assets/duotones lib/moon/assets/group_icons
rm -rf lib/moon/assets/icons lib/moon/assets/logos lib/moon/assets/patterns
mkdir -p lib/moon/assets/age_limit
mkdir -p lib/moon/assets/crests
mkdir -p lib/moon/assets/currencies
mkdir -p lib/moon/assets/duotones
mkdir -p lib/moon/assets/group_icons
mkdir -p lib/moon/assets/icons
mkdir -p lib/moon/assets/logos
mkdir -p lib/moon/assets/patterns
rm -rf lib/moon/icons
mkdir -p lib/moon/icons
rm -rf assets/static/svgs
mkdir -p assets/static/svgs/age_limit
mkdir -p assets/static/svgs/crests
mkdir -p assets/static/svgs/currencies
mkdir -p assets/static/svgs/duotones
mkdir -p assets/static/svgs/icons
mkdir -p assets/static/svgs/group_icons
mkdir -p assets/static/svgs/icons_new
mkdir -p assets/static/svgs/logos
mkdir -p assets/static/svgs/patterns
cd $root_dir/scripts/typescript/
cp $root_dir/.env $root_dir/scripts/typescript/.env
npx ts-node generate-svg-symbols.ts
npx ts-node assets-importer-legacy.ts
# moved to moon-icons repo
# npx ts-node icons-importer.ts
mix deps.update moon_icons
# mv node_modules/moon-design moon-design
# themes are not imported any more from react. there is https://github.com/coingaming/moon-design/tree/develop/workspaces/themes/src now
cp ../moon-design/workspaces/themes/src/*.css ../moon/priv/static/themes/
# npx ts-node theme-importer.ts
# mv moon-design node_modules/moon-design
# themes are not imported any more from react. there is https://github.com/coingaming/moon-design/tree/develop/workspaces/themes/src now
# npx ts-node figma-importer.ts
cd $root_dir
rm $root_dir/scripts/typescript/.env
bash run-formatters.sh
# mix phx.digest