Eddys Form
Form Block enhacement for Edge Delivery Services
Installation
Having a forked project from https://github.com/adobe/aem-boilerplate
You can use by just
npm i @netcentric/eddys-form
it will install the scripts at the root of your Edge delivery project under libs/eddys-form
Usage
in your /blocks
folder create a new block with a css and a js file
JS file: There Are 2 ways you can use this plugin
Option 1
Use eddys-form
block as it is with no possibility to extend the js
You need to import the defaultDecorate function from libs/eddys-form
.
And export the async function decorate to get your code executed when the block is in place.
import defaultDecorate from '/libs/eddys-form/eddys-form.js';
export default async function decorate(block) {
await defaultDecorate(block);
}
Option 2
Use a custom block developed using a js class extending the js class
You need to import the defaultDecorate
method and EddysForm
class from the libs/eddys-form
folder.
And export the async function decorate to get your code executed when the block is in place.
If you are extending the class you need to pass the extended class as a param in the defaultDecorate function
import { defaultDecorate, EddysForm } from '/libs/eddys-form/eddys-form.js';
class BlockName extends EddysForm {
constructor(block) {
super(block);
}
}
export default async function decorate(block) {
await defaultDecorate(block, BlockName);
}
CSS file:
You need to import the CSS file from the libs/eddys-form
block you want to use.
And then you can add as much extra CSS you want.
@import "/libs/eddys-form/eddys-form.css";
Release
Commit message Convention
<type>(<scope>): <short summary>
│ │ │
│ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
│ │
│ └─⫸ Commit Scope (optional): project|based|list
│
└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test