Skip to content

Commit

Permalink
address build issues
Browse files Browse the repository at this point in the history
Signed-off-by: Aleem Isiaka <[email protected]>
  • Loading branch information
limistah committed Dec 29, 2023
1 parent 1fd936f commit 106e6d4
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .babelrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
}
]
],
"plugins": []
"plugins": ["@babel/plugin-proposal-optional-chaining"]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
},
"devDependencies": {
"@babel/core": "^7.23.6",
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
"@babel/preset-env": "^7.23.6",
"@size-limit/preset-small-lib": "^11.0.1",
"@storybook/addon-essentials": "^7.6.5",
Expand Down
Empty file removed src/components/libs/initMap.ts
Empty file.
37 changes: 1 addition & 36 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,36 +1 @@
import React, { FC, HTMLAttributes, ReactChild } from 'react';
import { useHPlatform } from './components/Platform';
import { HMap } from './components';

export interface Props extends HTMLAttributes<HTMLDivElement> {
/** custom content, defaults to 'the snozzberries taste like snozzberries' */
children?: ReactChild;
}

// Please do not use types off of a default export module or else Storybook Docs will suffer.
// see: https://github.com/storybookjs/storybook/issues/9556

export const Thing: FC<Props> = props => {
console.log({ props });
const renderHereComponents = useHPlatform(
{
appId: 'EF8K24SYpkpXUO9rkbfA',
apiKey: 'TIAGlD6jic7l9Aa8Of8IFxo3EUemmcZlHm_agfAm6Ew',
includeUI: true,
includePlaces: false,
version: 'v3/3.1',
interactive: true,
},
<HMap
style={{
height: '480px',
width: '100%',
}}
useEvents
options={{ center: { lat: 52.5321472, lng: 13.3935785 } }}
/>
);
return <div>{renderHereComponents}</div>;
};

export * from './components';
export * from './components';
17 changes: 17 additions & 0 deletions tsdx.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Not transpiled with TypeScript or Babel, so use plain Es6/Node.js!
const replace = require('@rollup/plugin-replace');

module.exports = {
// This function will run for each entry/format/env combination
rollup(config, opts) {
config.plugins = config.plugins.map(p =>
p.name === 'replace'
? replace({
'process.env.NODE_ENV': JSON.stringify(opts.env),
preventAssignment: true,
})
: p
);
return config; // always return a config.
},
};
13 changes: 11 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
dependencies:
"@babel/types" "^7.22.5"

"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3":
"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295"
integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==
Expand Down Expand Up @@ -217,7 +217,7 @@
dependencies:
"@babel/types" "^7.22.5"

"@babel/helper-skip-transparent-expression-wrappers@^7.22.5":
"@babel/helper-skip-transparent-expression-wrappers@^7.20.0", "@babel/helper-skip-transparent-expression-wrappers@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz#007f15240b5751c537c40e77abb4e89eeaaa8847"
integrity sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==
Expand Down Expand Up @@ -310,6 +310,15 @@
"@babel/helper-create-class-features-plugin" "^7.18.6"
"@babel/helper-plugin-utils" "^7.18.6"

"@babel/plugin-proposal-optional-chaining@^7.21.0":
version "7.21.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz#886f5c8978deb7d30f678b2e24346b287234d3ea"
integrity sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==
dependencies:
"@babel/helper-plugin-utils" "^7.20.2"
"@babel/helper-skip-transparent-expression-wrappers" "^7.20.0"
"@babel/plugin-syntax-optional-chaining" "^7.8.3"

"@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2":
version "7.21.0-placeholder-for-preset-env.2"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz#7844f9289546efa9febac2de4cfe358a050bd703"
Expand Down

0 comments on commit 106e6d4

Please sign in to comment.