Skip to content

Commit

Permalink
fix: overlay react wrapper generation
Browse files Browse the repository at this point in the history
  • Loading branch information
jianliao authored and Westbrook committed Mar 6, 2023
1 parent 9f748e7 commit 922e30f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
7 changes: 6 additions & 1 deletion cem-react-wrapper.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ import { resolve } from 'path';
import yaml from 'js-yaml';

export default {
globs: ['**/sp-*.ts', '**/src/[A-Z]*.ts'],
globs: [
'**/sp-*.ts',
'**/active-overlay.ts',
'**/overlay-trigger.ts',
'**/src/[A-Z]*.ts',
],
exclude: [
'**/sp-icon-*.ts',
'**/*.d.ts',
Expand Down
8 changes: 7 additions & 1 deletion custom-elements-manifest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ governing permissions and limitations under the License.
import { moduleFileExtensionsPlugin } from 'cem-plugin-module-file-extensions';

export default {
globs: ['**/sp-*.ts', '**/src/[A-Z]*.ts', '**/src/elements/[A-Z]*.ts'],
globs: [
'**/sp-*.ts',
'**/active-overlay.ts',
'**/overlay-trigger.ts',
'**/src/[A-Z]*.ts',
'**/src/elements/[A-Z]*.ts',
],
exclude: [
'**/*.d.ts',
'**/stories/**',
Expand Down
6 changes: 4 additions & 2 deletions scripts/cem-plugin-react-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,10 @@ export default function genReactWrapper({
const fileImports = modules
.filter(
(m) =>
m.declarations.length === 0 &&
m.path.indexOf('sync/') === -1
m.exports.length === 1 &&
m.exports.filter(
(exp) => exp.kind === 'custom-element-definition'
).length > 0
)
.map(
(m) =>
Expand Down

0 comments on commit 922e30f

Please sign in to comment.