-
Notifications
You must be signed in to change notification settings - Fork 0
/
regenerate-purs-files.sh
executable file
·65 lines (55 loc) · 3.67 KB
/
regenerate-purs-files.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
#!/usr/bin/env bash
set -euxo pipefail
###################################
gen () {
# e.g. $2 = "Classes.RMWC.Avatar"
# e.g. filedir = "Classes/RMWC/Avatar.purs"
filedir=$(echo -n "$2" | sd --string-mode '.' '/' && echo -n ".purs")
output="./src/$filedir"
mkdir -p $(dirname $output)
$HOME/projects/generate-halogen-generate-css-classes/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/generate-halogen-generate-css-classes-exe/generate-halogen-generate-css-classes-exe \
--input "./node_modules/$1" \
--output "$output" \
--module-name "$2"
}
rm -rfd ./src/Material
gen @material/button/dist/mdc.button.css Material.Classes.Button
gen @material/card/dist/mdc.card.css Material.Classes.Card
gen @material/checkbox/dist/mdc.checkbox.css Material.Classes.Checkbox
gen @material/chips/dist/mdc.chips.css Material.Classes.Chips
gen @material/data-table/dist/mdc.data-table.css Material.Classes.DataTable
gen @material/dialog/dist/mdc.dialog.css Material.Classes.Dialog
gen @material/drawer/dist/mdc.drawer.css Material.Classes.Drawer
gen @material/elevation/dist/mdc.elevation.css Material.Classes.Elevation
gen @material/fab/dist/mdc.fab.css Material.Classes.Fab
gen @material/floating-label/dist/mdc.floating-label.css Material.Classes.FloatingLabel
gen @material/form-field/dist/mdc.form-field.css Material.Classes.FormField
# gen @material/grid-list/dist/mdc.grid-list.css Material.Classes.GridList
gen @material/icon-button/dist/mdc.icon-button.css Material.Classes.IconButton
gen @material/image-list/dist/mdc.image-list.css Material.Classes.ImageList
gen @material/layout-grid/dist/mdc.layout-grid.css Material.Classes.LayoutGrid
gen @material/line-ripple/dist/mdc.line-ripple.css Material.Classes.LineRipple
gen @material/linear-progress/dist/mdc.linear-progress.css Material.Classes.LinearProgress
gen @material/list/dist/mdc.list.css Material.Classes.List
gen @material/menu/dist/mdc.menu.css Material.Classes.Menu
gen @material/menu-surface/dist/mdc.menu-surface.css Material.Classes.MenuSurface
gen @material/notched-outline/dist/mdc.notched-outline.css Material.Classes.NotchedOutline
gen @material/radio/dist/mdc.radio.css Material.Classes.Radio
gen @material/ripple/dist/mdc.ripple.css Material.Classes.Ripple
gen @material/select/dist/mdc.select.css Material.Classes.Select
gen @material/slider/dist/mdc.slider.css Material.Classes.Slider
gen @material/snackbar/dist/mdc.snackbar.css Material.Classes.Snackbar
gen @material/switch/dist/mdc.switch.css Material.Classes.Switch
gen @material/tab/dist/mdc.tab.css Material.Classes.Tab
gen @material/tab-bar/dist/mdc.tab-bar.css Material.Classes.TabBar
gen @material/tab-indicator/dist/mdc.tab-indicator.css Material.Classes.TabIndicator
gen @material/tab-scroller/dist/mdc.tab-scroller.css Material.Classes.TabScroller
gen @material/textfield/dist/mdc.textfield.css Material.Classes.Textfield
gen @material/theme/dist/mdc.theme.css Material.Classes.Theme
gen @material/top-app-bar/dist/mdc.top-app-bar.css Material.Classes.TopAppBar
gen @material/typography/dist/mdc.typography.css Material.Classes.Typography
###################################
generate-halogen-css-modules -d ./demo
###################################
update-module-name-purs -d ./src
update-module-name-purs -d ./demo