File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,12 @@ cp "${SCRIPT_DIR}/${NAME}/index.js" "${DOCS_DIR}/index.js"
2727cp " ${SCRIPT_DIR} /${NAME} /index.html" " ${DOCS_DIR} /index.html"
2828cp " ${SCRIPT_DIR} /${NAME} /style.css" " ${DOCS_DIR} /style.css"
2929
30- # Copy the data folder if one is found.
30+ # Copy the public folder if one is found (graphics, other static files) .
3131if [ -d " public" ] && [ " $( ls -A public) " ]; then
3232 cp -r public/* " ${DOCS_DIR} /"
3333fi
34+
35+ # Copy the src folder if one is found (.js, .json, anything parseable by Vite).
36+ if [ -d " src" ] && [ " $( ls -A src) " ]; then
37+ cp -r src/* " ${DOCS_DIR} /"
38+ fi
Original file line number Diff line number Diff line change @@ -32,8 +32,15 @@ cp "${SCRIPT_DIR}/${NAME}/index.js" "${DIST_DIR}/samples/${NAME}/jsfiddle/demo.j
3232cp " ${SCRIPT_DIR} /${NAME} /index.html" " ${DIST_DIR} /samples/${NAME} /jsfiddle/demo.html"
3333cp " ${SCRIPT_DIR} /${NAME} /style.css" " ${DIST_DIR} /samples/${NAME} /jsfiddle/demo.css"
3434
35- # Copy the data folder if one is found.
36- [ -d " public" ] && cp -r public/* " ${DIST_DIR} /samples/${NAME} /jsfiddle/"
35+ # Copy the public folder if one is found (graphics, other static files).
36+ if [ -d " public" ] && [ " $( ls -A public) " ]; then
37+ cp -r public/* " ${DOCS_DIR} /"
38+ fi
39+
40+ # Copy the src folder if one is found (.js, .json, anything parseable by Vite).
41+ if [ -d " src" ] && [ " $( ls -A src) " ]; then
42+ cp -r src/* " ${DOCS_DIR} /"
43+ fi
3744
3845# Remove region tags from files by type, since they all have different comment conventions.
3946# We use a conditional here since sed behaves differently on Linux.
You can’t perform that action at this time.
0 commit comments