Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade #3383

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open

Upgrade #3383

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ umd/
dist/
node_modules/
types/
vike-example/

styleguide.config.js
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-env node */

module.exports = {
parser: '@typescript-eslint/parser',
plugins: [
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,7 @@ googleMapKey.js
.dccache

# Hide secret Google Maps API Config
.storybook/maps.config.ts
.storybook/maps.config.ts
packages/react-google-maps-api/.rollup.cache
react-google-maps-api-gatsby-example
packages/react-google-maps-api/tsconfig.tsbuildinfo
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.17.0
v22.9.0
4 changes: 2 additions & 2 deletions .storybook/example.maps.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { WrapperProps } from '@googlemaps/react-wrapper'

/**
* Secret Google Mpas API Config
* Secret Google Maps API Config
*
* Create `maps.congig.ts` in `.storybook` folder
* Create `maps.config.ts` in `.storybook` folder
* with the following content and replace `YOUR_API_KEY`
* with your API Key provided by Google.
*
Expand Down
36 changes: 19 additions & 17 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const babelOptions = {
'@babel/plugin-transform-typescript',
{
allowDeclareFields: true,
}
},
],
'@babel/plugin-syntax-jsx',
'@babel/plugin-transform-shorthand-properties',
Expand Down Expand Up @@ -84,21 +84,17 @@ const babelOptions = {
],
}


module.exports = {
reactOptions: {
fastRefresh: true,
},
"stories": [
"../packages/react-google-maps-api/**/*.stories.mdx",
"../packages/react-google-maps-api/**/*.stories.@(js|jsx|ts|tsx)",
"../packages/react-google-maps-api-gatsby-example/**/*.stories.mdx",
"../packages/react-google-maps-api-gatsby-example/**/*.stories.@(js|jsx|ts|tsx)",
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials"
stories: [
'../packages/react-google-maps-api/**/*.stories.mdx',
'../packages/react-google-maps-api/**/*.stories.@(js|jsx|ts|tsx)',
'../packages/react-google-maps-api-gatsby-example/**/*.stories.mdx',
'../packages/react-google-maps-api-gatsby-example/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
plugins: [
require('postcss-flexbugs-fixes'),
require('autoprefixer')({
Expand All @@ -122,9 +118,16 @@ module.exports = {
},
},
webpackFinal: (config) => {
config.resolve.alias['@react-google-maps/api'] = require.resolve('../packages/react-google-maps-api/src/index.ts');
config.resolve.alias['@react-google-maps/infobox'] = require.resolve('../packages/react-google-maps-api-infobox/src/index.ts');
config.resolve.alias['@react-google-maps/marker-clusterer'] = require.resolve('../packages/react-google-maps-api-marker-clusterer/src/index.ts');
config.resolve.alias['@react-google-maps/api'] = require.resolve(
'../packages/react-google-maps-api/src/index.ts'
)
config.resolve.alias['@react-google-maps/infobox'] = require.resolve(
'../packages/react-google-maps-api-infobox/src/index.ts'
)
config.resolve.alias['@react-google-maps/marker-clusterer'] =
require.resolve(
'../packages/react-google-maps-api-marker-clusterer/src/index.ts'
)

config.resolve.plugins = [
...(config.resolve.plugins || []),
Expand Down Expand Up @@ -198,7 +201,7 @@ module.exports = {
test: /\.(stories|story)\.mdx$/,
use: [
{
// Need to add babel-loader as dependency: `yarn add -D babel-loader`
// Need to add babel-loader as dependency: `pnpm install -D babel-loader`
loader: require.resolve('babel-loader'),
// may or may not need this line depending on your app's setup
options: babelOptions,
Expand Down Expand Up @@ -265,7 +268,6 @@ module.exports = {

config.resolve.alias = {}

return config;
return config
},

}
15 changes: 15 additions & 0 deletions .vscode/spellright.dict
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
eslint
Polyline
Svg
pnpm
tomchentw
npm
lodash
Roboto
infobox
Vike
bati
Clusterer
Heatmap
Kml
jsx
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ Ivan Konev <[email protected]>
1. Clone repository
2. git checkout development
3. make your own branch and make PR to development branch after finish with changes.
4. Use yarn to install in root folder and in each package directory.
4. Use `pnpm install -r` to install in root folder and in each package directory.

Inside root folder you will find packages:

1. @react-google-maps/api
2. @react-google-maps/infobox
3. @react-google-maps/marker-clusterer
4. gatsby-example [https://github.com/gatsbyjs/gatsby/issues](https://github.com/gatsbyjs/gatsby/issues)
5. storybook [https://github.com/storybooks/storybook](https://github.com/storybooks/storybook) - for visual testing of our components
4. storybook [https://github.com/storybooks/storybook](https://github.com/storybooks/storybook) - for visual testing of our components

You can donate or became a sponsor [https://opencollective.com/react-google-maps-api#category-CONTRIBUTE](https://opencollective.com/react-google-maps-api#category-CONTRIBUTE)
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ Join our [Slack channel](https://join.slack.com/t/react-google-maps-api/shared_i
- Google Maps API Key from [Google Cloud Console](https://console.cloud.google.com)
- git
- node
- yarn
- pnpm

### To develop locally

Fork original repo at <https://github.com/JustFly1984/react-google-maps-api>. Clone your fork to local directory of your choice, install dependencies, set up your API Key, and start storybook server. Following commands should do the job:

- `git clone https://github.com/YOUR_USER_NAME/react-google-maps-api.git` - clone your fork
`
`
- `cd react-google-maps-api` - move to newly created folder
- `cp .storybook/example.maps.config.ts .storybook/maps.config.ts` - create file with API Key
- `yarn install` - install dependencies
- `yarn bootstrap` - setup workspace
- `yarn storybook` - run storybook server
- `pnpm install` - install dependencies
- `pnpm run bootstrap` - setup workspace
- `pnpm run storybook` - run storybook server

Any changes you make to src folders of contained packages should reflect on the storybook server.

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"packages/*"
],
"version": "independent",
"npmClient": "yarn"
"npmClient": "pnpm"
}
3 changes: 0 additions & 3 deletions netlify.toml

This file was deleted.

Loading