Skip to content
This repository has been archived by the owner on Nov 26, 2021. It is now read-only.

Commit

Permalink
Merge pull request #34 from Financial-Times/component-mapping
Browse files Browse the repository at this point in the history
- Add new components to components.js list.
- Add "@financial-times/ftdomdelegate" exception to `createComponentName`.
  • Loading branch information
notlee authored Nov 12, 2019
2 parents fd7a881 + a798edb commit 7ff3d8b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion config/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,7 @@ export default [
"o-viewport",
"o-visual-effects",
"o-spacing",
"o-lazy-load"
"o-lazy-load",
"o-editorial-typography",
"o-editorial-layout",
]
8 changes: 7 additions & 1 deletion lib/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ export let mergeManifests = (existing, generated) => {
export let createComponentName = (
componentName,
npmOrganisation = settings.npmOrganisation
) => `@${npmOrganisation}/${componentName}`
) => {
// ftdomdelegate is special. It is not published under any org.
if (componentName == 'ftdomdelegate') {
return 'ftdomdelegate';
}
return `@${npmOrganisation}/${componentName}`;
}

/**
* Get an npm package name for a bower package name. if it's an origami component,
Expand Down

0 comments on commit 7ff3d8b

Please sign in to comment.