Skip to content

Commit

Permalink
renamed scripts to __vendors__
Browse files Browse the repository at this point in the history
  • Loading branch information
fnhipster committed Jan 26, 2024
1 parent ca12b3b commit 16f6587
Show file tree
Hide file tree
Showing 106 changed files with 11 additions and 12 deletions.
1 change: 0 additions & 1 deletion .hlxignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ LICENSE
package.json
package-lock.json
test/*
!vendors/
10 changes: 5 additions & 5 deletions head.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<script type="importmap">
{
"imports": {
"@dropins/elsie/": "/vendors/@dropins/elsie/",
"@dropins/storefront-cart/": "/vendors/@dropins/storefront-cart/",
"@dropins/storefront-checkout/": "/vendors/@dropins/storefront-checkout/",
"@dropins/storefront-pdp/": "/vendors/@dropins/storefront-pdp/",
"@dropins/storefront-order-confirmation/": "/vendors/@dropins/storefront-order-confirmation/"
"@dropins/elsie/": "/scripts/__vendors__/@dropins/elsie/",
"@dropins/storefront-cart/": "/scripts/__vendors__/@dropins/storefront-cart/",
"@dropins/storefront-checkout/": "/scripts/__vendors__/@dropins/storefront-checkout/",
"@dropins/storefront-pdp/": "/scripts/__vendors__/@dropins/storefront-pdp/",
"@dropins/storefront-order-confirmation/": "/scripts/__vendors__/@dropins/storefront-order-confirmation/"
}
}
</script>
Expand Down
12 changes: 6 additions & 6 deletions install_vendors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ declare -a files_to_copy=(
)

# Remove existing dropins folder
rm -rf vendors/
rm -rf scripts/__vendors__

# Create vendors directory if not exists
mkdir -p vendors/
# Create scripts/__vendors__ directory if not exists
mkdir -p scripts/__vendors__

# Copy specified files from node_modules/@dropins to vendors/dropins
# Copy specified files from node_modules/@dropins to scripts/__vendors__/dropins
for file in "${files_to_copy[@]}"; do
cp -R "node_modules/$file" "vendors/."
cp -R "node_modules/$file" "scripts/__vendors__/."
done

# Remove package.json files inside dropins
find vendors -type f -name "package.json" -exec rm {} \;
find scripts/__vendors__ -type f -name "package.json" -exec rm {} \;

echo "🫡 Vendors installed successfully!"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 16f6587

Please sign in to comment.