Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion samples/build-single.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ npx eslint
# clean comments for empty lines, and then clean up, to preserve newlines
sed -i.sed-back 's#^$#// TMP EMPTY LINE#g' *.ts && rm *.sed-back
set +e
rm -rf dist
set +e
npx tsc
status=$?
set -e
Expand Down Expand Up @@ -207,6 +209,10 @@ set -e

bash ../jsfiddle.sh "$NAME"
bash ../app.sh "$NAME"
bash ../docs.sh "$NAME"
if [ -f "src/app.tsx" ] || [ -f "src/app.jsx" ] || [ -f "src/app.js" ]; then
bash ../react-docs.sh "$NAME"
else
bash ../docs.sh "$NAME"
fi
npm run build:vite --workspace=.
bash ../dist.sh "$NAME"
1 change: 1 addition & 0 deletions samples/dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ SAMPLE_DIR="${PROJECT_ROOT}/dist/samples/${NAME}"
echo "PROJECT_ROOT: ${PROJECT_ROOT}"

# Copy Vite output files to /dist/samples/${NAME}/dist
rm -rf "${SAMPLE_DIR}/dist"
cp -r "${SCRIPT_DIR}/${NAME}/dist" "${SAMPLE_DIR}"
35 changes: 24 additions & 11 deletions samples/react-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,29 @@ echo "PROJECT_ROOT: ${PROJECT_ROOT}"

DOCS_DIR="${PROJECT_ROOT}/dist/samples/${NAME}/docs"

# Create two new folders.
mkdir -p ${DOCS_DIR}/src
# Create new folders.
mkdir -p "${DOCS_DIR}/src"

# Copy files
cp "${SCRIPT_DIR}/${NAME}/src/app.js" "${DOCS_DIR}/src/app.js"
cp "${SCRIPT_DIR}/${NAME}/src/app.tsx" "${DOCS_DIR}/src/app.tsx"
cp "${SCRIPT_DIR}/${NAME}/src/styles.css" "${DOCS_DIR}/src/styles.css"
cp "${SCRIPT_DIR}/${NAME}/index.html" "${DOCS_DIR}/index.html"

# Copy the data folder if one is found.
if [ -d "public" ] && [ "$(ls -A public)" ]; then
cp -r public/* "${DOCS_DIR}/"
fi
if [ -f "${SCRIPT_DIR}/${NAME}/dist/app.js" ]; then
cp "${SCRIPT_DIR}/${NAME}/dist/app.js" "${DOCS_DIR}/app.js"
fi

if [ -f "${SCRIPT_DIR}/${NAME}/src/app.tsx" ]; then
cp "${SCRIPT_DIR}/${NAME}/src/app.tsx" "${DOCS_DIR}/src/app.tsx"
fi

if [ -f "${SCRIPT_DIR}/${NAME}/style.css" ]; then
cp "${SCRIPT_DIR}/${NAME}/style.css" "${DOCS_DIR}/style.css"
elif [ -f "${SCRIPT_DIR}/${NAME}/src/styles.css" ]; then
cp "${SCRIPT_DIR}/${NAME}/src/styles.css" "${DOCS_DIR}/style.css"
fi

if [ -f "${SCRIPT_DIR}/${NAME}/index.html" ]; then
cp "${SCRIPT_DIR}/${NAME}/index.html" "${DOCS_DIR}/index.html"
fi

# Copy the public folder if one is found (graphics, other static files).
if [ -d "${SCRIPT_DIR}/${NAME}/public" ] && [ "$(ls -A ${SCRIPT_DIR}/${NAME}/public)" ]; then
cp -r "${SCRIPT_DIR}/${NAME}/public/"* "${DOCS_DIR}/"
fi
3 changes: 2 additions & 1 deletion samples/react-ui-kit-place-details-compact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"build:vite": "vite build --config ../../vite.config.js --base './'",
"preview": "vite preview --config ../../vite.config.js"
},
"author": "Google LLC"
"author": "Google LLC",
"buildRevision": 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"build:vite": "vite build --config ../../vite.config.js --base './'",
"preview": "vite preview --config ../../vite.config.js"
},
"author": "Google LLC"
"author": "Google LLC",
"buildRevision": 1
}
3 changes: 2 additions & 1 deletion samples/react-ui-kit-place-details-latlng/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"devDependencies": {
"@vitejs/plugin-react": "^6.0.2"
},
"author": "Google LLC"
"author": "Google LLC",
"buildRevision": 1
}
3 changes: 2 additions & 1 deletion samples/react-ui-kit-place-details/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"build:vite": "vite build --config ../../vite.config.js --base './'",
"preview": "vite preview --config ../../vite.config.js"
},
"author": "Google LLC"
"author": "Google LLC",
"buildRevision": 1
}
3 changes: 2 additions & 1 deletion samples/react-ui-kit-search-nearby/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"devDependencies": {
"@vitejs/plugin-react": "^6.0.2"
},
"author": "Google LLC"
"author": "Google LLC",
"buildRevision": 1
}
3 changes: 2 additions & 1 deletion samples/react-ui-kit-search-text/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"devDependencies": {
"@vitejs/plugin-react": "^6.0.2"
},
"author": "Google LLC"
"author": "Google LLC",
"buildRevision": 1
}
3 changes: 2 additions & 1 deletion samples/rgm-autocomplete/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"build:vite": "vite build --config ../../vite.config.js --base './'",
"preview": "vite preview --config ../../vite.config.js"
},
"author": "Google LLC"
"author": "Google LLC",
"buildRevision": 1
}
3 changes: 2 additions & 1 deletion samples/rgm-basic-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"build:vite": "vite build --config ../../vite.config.js --base './'",
"preview": "vite preview --config ../../vite.config.js"
},
"author": "Google LLC"
"author": "Google LLC",
"buildRevision": 1
}
Loading