Skip to content

Commit

Permalink
feat(plugman): support framework link attribute (#1266)
Browse files Browse the repository at this point in the history
* Updated plugman pluginHandlers to support framework link attribute. Update is backwards compatible with previous embed behaviour.

* removed dev logs
  • Loading branch information
TylerBreau authored Apr 14, 2023
1 parent 19573fc commit 3d6c71a
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 3,703 deletions.
8 changes: 7 additions & 1 deletion lib/plugman/pluginHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,13 @@ const handlers = {
const src = obj.src;
const custom = !!(obj.custom); // convert to boolean (if truthy/falsy)
const embed = !!(obj.embed); // convert to boolean (if truthy/falsy)
const link = !embed; // either link or embed can be true, but not both. the other has to be false
let link;
// If obj.link is not explicitly set, default to pre-link attribute behaviour
if (obj.link === null || obj.link === undefined) {
link = !embed;
} else {
link = String(obj.link).toLowerCase() === 'true';
}

if (!custom) {
const keepFrameworks = keep_these_frameworks;
Expand Down
Loading

0 comments on commit 3d6c71a

Please sign in to comment.