mirror of
https://github.com/google-map-react/google-map-react.git
synced 2025-12-08 18:26:32 +00:00
Merge umd-build branch. This closes #13
commit 8b1ed17602b01c2c63d7c341f6cc70711ff8f925
Author: Moz Morris <moz@earthview.co.uk>
Date: Sun Jun 28 11:33:40 2015 +0100
Fixup exports.
commit a64ce1c6fb73fe9dee9f2d0bec38574ad7d1897e
Author: Moz Morris <moz@earthview.co.uk>
Date: Sun Jun 28 10:42:28 2015 +0100
[added] bower support
This commit is contained in:
parent
0af37cdea6
commit
e4505e2a6b
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
lib/*
|
||||
!lib/umd
|
||||
/node_modules
|
||||
/modules
|
||||
@ -3,10 +3,18 @@
|
||||
It allows you to create interfaces like this [example](http://istarkov.github.io/google-map-react/map/main) *(You can scroll the table, zoom/move the map, hover/click on markers, and click on table rows)*
|
||||
|
||||
##Installation
|
||||
|
||||
### npm
|
||||
```
|
||||
npm install --save google-map-react
|
||||
```
|
||||
|
||||
### bower
|
||||
```
|
||||
bower install --save google-map-react
|
||||
```
|
||||
The global will be available at: `window.GoogleMapReact`
|
||||
|
||||
##What's it Look Like?
|
||||
In the simple case you just need to add `lat` `lng` props to any child of `GoogleMap` component.
|
||||
[simple example in action](http://istarkov.github.io/google-map-react/map/simple)
|
||||
|
||||
31
bower.json
Normal file
31
bower.json
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "google-map-react",
|
||||
"description": "isomorphic google map react component, allows render react components on the google map",
|
||||
"main": "lib/umd/GoogleMapReact.js",
|
||||
"homepage": "https://github.com/istarkov/google-map-react",
|
||||
"authors": [
|
||||
"Ivan Starkov <istarkov@gmail.com>"
|
||||
],
|
||||
"keywords": [
|
||||
"react",
|
||||
"reactjs",
|
||||
"google",
|
||||
"map",
|
||||
"maps",
|
||||
"isomorphic",
|
||||
"render",
|
||||
"component",
|
||||
"javascript",
|
||||
"react-component"
|
||||
],
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"src",
|
||||
"scripts",
|
||||
"package.json",
|
||||
"webpack.config.js"
|
||||
]
|
||||
}
|
||||
4175
lib/umd/GoogleMapReact.js
Normal file
4175
lib/umd/GoogleMapReact.js
Normal file
File diff suppressed because it is too large
Load Diff
7
lib/umd/GoogleMapReact.min.js
vendored
Normal file
7
lib/umd/GoogleMapReact.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
11
package.json
11
package.json
@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "google-map-react",
|
||||
"version": "0.3.3",
|
||||
"version": "0.4.0",
|
||||
"description": "isomorphic google map react component, allows render react components on the google map",
|
||||
"main": "modules/index.js",
|
||||
"main": "lib/index",
|
||||
"scripts": {
|
||||
"build": "./scripts/build.sh",
|
||||
"prepublish": "npm run build",
|
||||
"eyetest": "babel-node ./src/__tests__/eye_test.js",
|
||||
"es5eyetest": "node ./modules/__tests__/eye_test.js"
|
||||
"es5eyetest": "node ./lib/__tests__/eye_test.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -47,6 +47,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel": "^5.5.6",
|
||||
"react": "^0.13.3"
|
||||
"babel-core": "^5.6.15",
|
||||
"babel-loader": "^5.2.2",
|
||||
"react": "^0.13.3",
|
||||
"webpack": "^1.10.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,13 @@
|
||||
#!/bin/sh
|
||||
rm -rf modules
|
||||
./node_modules/.bin/babel src --out-dir modules
|
||||
babel=node_modules/.bin/babel
|
||||
webpack=node_modules/.bin/webpack
|
||||
build_dir=lib
|
||||
|
||||
rm -rf $build_dir
|
||||
|
||||
$babel ./src -d $build_dir --ignore "__tests__" --loose all
|
||||
|
||||
NODE_ENV=production $webpack src/index.js $build_dir/umd/GoogleMapReact.js
|
||||
NODE_ENV=production $webpack -p src/index.js $build_dir/umd/GoogleMapReact.min.js
|
||||
|
||||
echo "gzipped, the global build is `gzip -c $build_dir/umd/GoogleMapReact.min.js | wc -c | sed -e 's/^[[:space:]]*//'` bytes"
|
||||
|
||||
@ -1 +1 @@
|
||||
export * from './google_map.js';
|
||||
export default from './google_map.js';
|
||||
|
||||
38
webpack.config.js
Normal file
38
webpack.config.js
Normal file
@ -0,0 +1,38 @@
|
||||
var webpack = require('webpack');
|
||||
|
||||
module.exports = {
|
||||
|
||||
output: {
|
||||
library: 'GoogleMapReact',
|
||||
libraryTarget: 'umd'
|
||||
},
|
||||
|
||||
externals: [
|
||||
{
|
||||
"react": {
|
||||
root: "React",
|
||||
commonjs2: "react",
|
||||
commonjs: "react",
|
||||
amd: "react"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
module: {
|
||||
loaders: [
|
||||
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel?loose=all' }
|
||||
]
|
||||
},
|
||||
|
||||
node: {
|
||||
Buffer: false
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.optimize.OccurenceOrderPlugin(),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
|
||||
})
|
||||
]
|
||||
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user