Skip to content

Commit b3bc11c

Browse files
Rewrite library using create-react-library (google-map-react#900)
* Rewrite library using create-react-library * Export utils properly * Remove unnecessary code and fix eslintignore * Update CHANGELOG
1 parent e70d0f7 commit b3bc11c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+20468
-5268
lines changed

.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
build/
2+
dist/
3+
node_modules/
4+
.snapshots/
5+
*.min.js
6+
*.spec.js

.eslintrc

Lines changed: 18 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,33 @@
11
{
2+
"parser": "babel-eslint",
23
"extends": [
3-
"airbnb",
4-
"prettier",
5-
"prettier/flowtype",
4+
"standard",
5+
"standard-react",
6+
"plugin:prettier/recommended",
7+
"prettier/standard",
68
"prettier/react"
79
],
8-
"plugins": [
9-
"babel",
10-
"prettier"
11-
],
12-
"parser": "babel-eslint",
1310
"env": {
14-
"es6": true,
15-
"browser": true,
16-
"mocha": true,
17-
"jest": true,
1811
"node": true
1912
},
2013
"parserOptions": {
21-
"ecmaVersion": 2017,
22-
"sourceType": "module",
14+
"ecmaVersion": 2020,
2315
"ecmaFeatures": {
24-
"jsx": true,
25-
"generators": true,
26-
"experimentalObjectRestSpread": true
16+
"legacyDecorators": true,
17+
"jsx": true
18+
}
19+
},
20+
"settings": {
21+
"react": {
22+
"version": "16"
2723
}
2824
},
2925
"rules": {
30-
"no-bitwise": 0,
31-
"no-nested-ternary": 0,
26+
"space-before-function-paren": 0,
3227
"react/prop-types": 0,
33-
"react/jsx-filename-extension": 0,
34-
"react/require-default-props": 0,
28+
"react/jsx-handler-names": 0,
29+
"react/jsx-fragments": 0,
3530
"react/no-unused-prop-types": 0,
36-
"no-sequences": 1,
37-
"comma-dangle": 0,
38-
"no-mixed-operators": 0,
39-
"no-underscore-dangle": 0,
40-
"no-restricted-properties": 0,
41-
"jsx-a11y/no-static-element-interactions": 0,
42-
"import/no-extraneous-dependencies": 0,
43-
"no-plusplus": 0,
44-
"no-unused-vars": [
45-
"error",
46-
{
47-
"ignoreRestSiblings": true
48-
}
49-
],
50-
"react/sort-comp": 0,
51-
"prettier/prettier": [
52-
"error",
53-
{
54-
"trailingComma": "es5",
55-
"singleQuote": true
56-
}
57-
]
58-
},
59-
"settings": {
60-
"polyfills": [
61-
"fetch__"
62-
]
63-
},
64-
"globals": {}
31+
"import/export": 0
32+
}
6533
}

.flowconfig

Lines changed: 0 additions & 35 deletions
This file was deleted.

.gitignore

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
lib/*
2-
dist/*
3-
/node_modules
4-
.idea/
1+
2+
# See https://help.github.com/ignore-files/ for more about ignoring files.
3+
4+
# dependencies
5+
node_modules
6+
7+
# builds
8+
build
9+
dist
10+
.rpt2_cache
11+
12+
# misc
13+
.DS_Store
14+
.env
15+
.env.local
16+
.env.development.local
17+
.env.test.local
18+
.env.production.local
19+
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*

.npmignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"singleQuote": true,
3+
"jsxSingleQuote": true,
4+
"semi": true,
5+
"tabWidth": 2,
6+
"bracketSpacing": true,
7+
"jsxBracketSameLine": false,
8+
"arrowParens": "always",
9+
"trailingComma": "es5"
10+
}

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
language: node_js
22
node_js:
3-
- stable
3+
- stable
44
cache:
55
directories:
6-
- node_modules
6+
- node_modules
77
before_script:
88
- git diff --exit-code # make sure that yarn.lock didn't change
99
script:
10-
- yarn run lint
10+
- yarn test:lint
1111
- yarn test

.vscode/settings.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ render() {
197197
Example:
198198

199199
```javascript
200-
import { fitBounds } from 'google-map-react/utils';
200+
import { fitBounds } from 'google-map-react';
201201

202202
const bounds = {
203203
nw: {

CHANGELOG.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1+
## [unreleased(major)]
2+
3+
### Changed
4+
5+
- Rewrite library using [create-react-library](https://www.npmjs.com/package/create-react-library)
6+
- **Breaking** Move `google-map-react/utils` to module import, so instead of doing `import { utilName } from 'google-map-react/utils` you will do `import { utilName } from google-map-react`
7+
8+
## 0.9v
9+
110
Add prop `onDragEnd` to react on the `dragend` event
211

312
Add [google-map-clustering-example](https://github.com/istarkov/google-map-clustering-example)
413

514
Add prop `onTilesLoaded` to react on the `tilesloaded` event
615

7-
###0.9v
8-
916
Add: `bootstrapURLKeys` (object) instead of `apiKey` prop
1017

1118
(`apiKey` prop is now deprecated)
@@ -22,12 +29,11 @@ Example:
2229
>
2330
```
2431

25-
###0.8v
32+
## 0.8v
2633

2734
Draggable markers support, examples comig soon.
2835

29-
30-
###Mon Oct 5 2015
36+
## Mon Oct 5 2015
3137

3238
Add `OnChange({center, zoom, bounds: {nw, se}, size, ...oherMapProps})`
3339

@@ -58,10 +64,10 @@ Add `utils` functions, with `fitBounds` and other functions
5864
```
5965

6066

61-
###Sun Oct 4 2015
67+
## Sun Oct 4 2015
6268
Add minZoom calculation, to prevent situations when one map point can have multiple screen coordinates.
6369

64-
###Sun Oct 4 2015
70+
## Sun Oct 4 2015
6571
Add ability to access to internal google api
6672

6773
```javascript
@@ -71,14 +77,14 @@ Add ability to access to internal google api
7177
(*to prevent warn message add _yesIWantToUseGoogleMapApiInternals_ property to GoogleMap*)
7278

7379

74-
###Sun Oct 4 2015
80+
## Sun Oct 4 2015
7581

7682
Add: `defaultZoom` `defaultCenter` properties, it closes #9 #10
7783

78-
###Sat Oct 3 2015
84+
## Sat Oct 3 2015
7985

8086
Support `center` prop as `{lat, lng}` object
8187

82-
###Thu Oct 1 2015
88+
## Thu Oct 1 2015
8389

8490
Add `onClick`, `onZoomAnimationStart`, `onZoomAnimationEnd` events.

DOC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ _)
144144
### Helper utilities
145145

146146
```javascript
147-
import { meters2ScreenPixels } from 'google-map-react/utils';
147+
import { meters2ScreenPixels } from 'google-map-react';
148148
const { w, h } = meters2ScreenPixels(sizeInMeters, { lat, lng } /* marker coords*/, zoom /* map zoom*/);
149149
```
150150

bower.json

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)