-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcreate_components.sh
More file actions
executable file
·42 lines (35 loc) · 1.34 KB
/
create_components.sh
File metadata and controls
executable file
·42 lines (35 loc) · 1.34 KB
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
#!/bin/bash
# List of component names
components=(
"InputBase" "InputLabel" "InputControl" "InputIcon" "InputHelperText"
"InputErrorMessage" "InputGroup" "TextAreaControl" "NumberInput" "DatePicker"
"TimePicker" "FileUpload" "ColorPicker" "SelectBase" "MultiSelect" "Combobox"
"AutoComplete" "CheckboxGroup" "RadioGroup" "ToggleSwitch" "ScrollArea"
"Badge" "Pill" "Tooltip" "Popover" "ValidationSummary" "ConfirmDialog"
"FormActions" "ProgressIndicator" "LoadingSpinner" "ValidationIcon"
"FormGroup" "FormRow" "FormDivider" "FormMessage" "FormSection"
"FormGrid" "FormStepper" "FormAccordion" "FormTabs" "FieldArray"
"DynamicField"
)
# Loop through each component and create folder and files
for component in "${components[@]}"
do
# Create component directory
mkdir -p "$component"
echo "Created directory $component"
# Create index.ts
touch "$component/index.ts"
echo "Created $component/index.ts"
# Create <component_name>.tsx
touch "$component/${component}.tsx"
echo "Created $component/${component}.tsx"
# Create TODO.md
touch "$component/TODO.md"
echo "Created $component/TODO.md"
# Create styled.ts
touch "$component/styled.ts"
echo "Created $component/styled.ts"
# Create types.ts
touch "$component/types.ts"
echo "Created $component/types.ts"
done