#!/bin/bash rm -rf dist/types # Find all vue files, and convert them to .ts files find src/component -name "*.vue" -type f -print0 | while IFS= read -r -d '' file; do # Get the file name filename=$(basename -- "$file") # Get the file name without extension filename="${filename%.*}" # Get the directory name directory=$(dirname -- "$file") # Get the directory name without the first dot directory="${directory}" if [ "$directory" = "" ]; then directory="." fi echo "Creating: $file --> $directory/$filename.ts" # Get contant of the file, that is between content=$(sed -n '/