Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated blocks (and supporting files) to reference aem.js instead of … #17 #18

Merged
merged 2 commits into from
Oct 25, 2023
Merged
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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Your Project's Title...
Your project's description...
# Block collection

This project contains code that is feature on the [AEM Block Collection](https://www.aem.live/developer/block-collection#block-collection-1) documentation.

## Environments
- Preview: https://main--{repo}--{owner}.hlx.page/
Expand Down
2 changes: 1 addition & 1 deletion blocks/cards/cards.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createOptimizedPicture } from '../../scripts/lib-franklin.js';
import { createOptimizedPicture } from '../../scripts/aem.js';

export default function decorate(block) {
/* change to ul, li */
Expand Down
2 changes: 1 addition & 1 deletion blocks/footer/footer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readBlockConfig, decorateIcons } from '../../scripts/lib-franklin.js';
import { readBlockConfig, decorateIcons } from '../../scripts/aem.js';

/**
* loads and decorates the footer
Expand Down
2 changes: 1 addition & 1 deletion blocks/fragment/fragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {

import {
loadBlocks,
} from '../../scripts/lib-franklin.js';
} from '../../scripts/aem.js';

/**
* Loads a fragment.
Expand Down
2 changes: 1 addition & 1 deletion blocks/header/header.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readBlockConfig, decorateIcons } from '../../scripts/lib-franklin.js';
import { readBlockConfig, decorateIcons } from '../../scripts/aem.js';

/**
* collapses all open nav sections
Expand Down
2 changes: 1 addition & 1 deletion head.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<script src="/scripts/lib-franklin.js" type="module" crossorigin="use-credentials"></script>
<script src="/scripts/aem.js" type="module" crossorigin="use-credentials"></script>
<script src="/scripts/scripts.js" type="module" crossorigin="use-credentials"></script>
<link rel="stylesheet" href="/styles/styles.css"/>
<link rel="icon" href="data:,">
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/delayed.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// eslint-disable-next-line import/no-cycle
import { sampleRUM } from './lib-franklin.js';
import { sampleRUM } from './aem.js';

// Core Web Vitals RUM collection
sampleRUM('cwv');
Expand Down
2 changes: 1 addition & 1 deletion scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
waitForLCP,
loadBlocks,
loadCSS,
} from './lib-franklin.js';
} from './aem.js';

const LCP_BLOCKS = []; // add your LCP blocks to the list
window.hlx.RUM_GENERATION = 'project-1'; // add your RUM generation information here
Expand Down
2 changes: 1 addition & 1 deletion test/blocks/footer/footer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { expect } from '@esm-bundle/chai';

document.body.innerHTML = await readFile({ path: '../../scripts/dummy.html' });

const { buildBlock, decorateBlock, loadBlock } = await import('../../../scripts/lib-franklin.js');
const { buildBlock, decorateBlock, loadBlock } = await import('../../../scripts/aem.js');

document.body.innerHTML = await readFile({ path: '../../scripts/body.html' });

Expand Down
2 changes: 1 addition & 1 deletion test/blocks/header/header.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { expect } from '@esm-bundle/chai';

document.body.innerHTML = await readFile({ path: '../../scripts/dummy.html' });

const { buildBlock, decorateBlock, loadBlock } = await import('../../../scripts/lib-franklin.js');
const { buildBlock, decorateBlock, loadBlock } = await import('../../../scripts/aem.js');

document.body.innerHTML = await readFile({ path: '../../scripts/body.html' });

Expand Down
2 changes: 1 addition & 1 deletion test/scripts/block-utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ document.head.innerHTML = await readFile({ path: './head.html' });

describe('Utils methods', () => {
before(async () => {
blockUtils = await import('../../scripts/lib-franklin.js');
blockUtils = await import('../../scripts/aem.js');
document.body.innerHTML = await readFile({ path: './body.html' });
});

Expand Down