2022-11-17 18:34:59 +08:00
|
|
|
cd src
|
|
|
|
|
|
|
|
printf "assets={"
|
|
|
|
printf "\"root\":[\"./\","
|
2022-11-21 21:59:21 +08:00
|
|
|
find . -maxdepth 1 -type f -not -path "*/.*" -not -path "./service-worker.js" | xargs printf "\"%s\"," "$@"
|
2022-11-17 18:34:59 +08:00
|
|
|
printf "],"
|
|
|
|
for DIR in $(find . -type d -mindepth 1 -maxdepth 1); do
|
|
|
|
printf "\""${DIR#*./}"\":["
|
|
|
|
printf "\"%s/\"," "${DIR#*./}"
|
2022-11-21 21:59:21 +08:00
|
|
|
find $DIR -type f -not -path "*/.*" -not -name "*.scss" -not -name "*.css.map" | xargs printf "\"%s\"," "$@"
|
2022-11-17 18:34:59 +08:00
|
|
|
# find $DIR -type d -not -path '*/.*' | xargs printf "\"%s/\"," "$@"
|
|
|
|
printf "],"
|
|
|
|
done
|
|
|
|
printf "};"
|