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
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
; force @adobe namespaced packages to be installed from npmjs.org
@adobe:registry=https://registry.npmjs.org
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"dependencies": {
"@adobe/magento-storefront-event-collector": "^1.7.1",
"@adobe/magento-storefront-events-sdk": "^1.7.1",
"@dropins/storefront-cart": "0.1.1-beta1",
"@dropins/storefront-cart": "0.1.1",
"@dropins/storefront-checkout": "0.1.0-alpha30",
"@dropins/storefront-order-confirmation": "0.1.0-alpha19",
"@dropins/storefront-pdp": "0.2.2-alpha24",
Expand Down
40 changes: 39 additions & 1 deletion postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,42 @@ fs.readdirSync('node_modules/@dropins', { withFileTypes: true }).forEach((file)
fs.copyFileSync(path.resolve(__dirname, './node_modules/@adobe/magento-storefront-event-collector/dist/index.js'), path.resolve(__dirname, './scripts/commerce-events-collector.js'));
fs.copyFileSync(path.resolve(__dirname, './node_modules/@adobe/magento-storefront-events-sdk/dist/index.js'), path.resolve(__dirname, './scripts/commerce-events-sdk.js'));

console.log('🫡 Drop-ins installed successfully!');
function checkPackageLockForArtifactory() {
return new Promise((resolve, reject) => {
fs.readFile('package-lock.json', 'utf8', (err, data) => {
if (err) {
reject(err);
return;
}
try {
const packageLock = JSON.parse(data);
let found = false;
Object.keys(packageLock.packages).forEach((packageName) => {
const packageInfo = packageLock.packages[packageName];
if (packageInfo.resolved && packageInfo.resolved.includes('artifactory')) {
console.warn(`Warning: artifactory found in resolved property for package ${packageName}`);
found = true;
}
});
resolve(found);
} catch (error) {
reject(error);
}
});
});
}

checkPackageLockForArtifactory()
.then((found) => {
if (!found) {
console.log('🫡 Drop-ins installed successfully!');
process.exit(0);
} else {
console.error('🚨 Fix artifactory references before committing! 🚨');
process.exit(1);
}
})
.catch((error) => {
console.error('Error:', error);
process.exit(1);
});
2 changes: 1 addition & 1 deletion scripts/__dropins__/storefront-cart/928.js

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -257,20 +257,20 @@ main pre {
}

/* links */
a:any-link {
a:not(.dropin-design a) {
color: var(--color-brand-500);
font: var(--type-body-1-strong-font);
letter-spacing: var(--type-body-1-strong-letter-spacing);
text-decoration: none;
}

a:hover {
a:not(.dropin-design a):hover {
text-decoration: solid underline var(--color-brand-700);
text-underline-offset: 6px;
color: var(--color-brand-700);
}

a:focus-visible {
a:not(.dropin-design a):focus-visible {
outline: solid var(--shape-border-width-4) var(--color-neutral-400);
border: var(--shape-border-width-1) solid var(--color-neutral-800);
border-radius: var(--shape-border-radius-1);
Expand Down Expand Up @@ -299,11 +299,11 @@ main button.button {
cursor: pointer;
color: var(--color-neutral-50);
background-color: var(--color-brand-500);
margin: 16px 0;
margin: var(--spacing-small) 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
border-radius: 30px;
border-radius: var(--shape-border-radius-3);
}

main a.button:hover,
Expand Down Expand Up @@ -373,12 +373,12 @@ main img {

/* sections */
main .section {
padding: 64px 16px;
padding: var(--spacing-large) var(--spacing-small);
}

@media (width >=600px) {
main .section {
padding: 64px 32px;
padding: var(--spacing-large) var(--spacing-big);
}
}

Expand Down