react-cartographer
Advanced tools
Comparing version 0.2.1 to 0.3.0
@@ -10,8 +10,12 @@ /** | ||
grunt.initConfig({ | ||
clean: ['./build'], | ||
clean: ['./build', './lib'], | ||
babel: { | ||
dist: { | ||
files: { | ||
'components-dist/Map.js': 'components/Map.jsx' | ||
} | ||
files: [{ | ||
expand: true, | ||
cwd: 'lib', | ||
src: ['src/**.jsx', 'src/**.js', 'src/**.json'], | ||
dest: 'lib', | ||
ext: '.js' | ||
}] | ||
} | ||
@@ -48,3 +52,7 @@ }, | ||
{ test: /\.json/, loader: 'json-loader' }, | ||
{ test: /\.jsx$/, loader: 'babel-loader' }, | ||
{ | ||
test: /\.(js|jsx)$/, | ||
exclude: /node_modules/, | ||
loader: 'babel-loader' | ||
} | ||
] | ||
@@ -51,0 +59,0 @@ }, |
126
index.jsx
@@ -5,7 +5,6 @@ /** | ||
*/ | ||
'use strict'; | ||
var React = require('react/addons'); | ||
var Map = require('./components/Map.jsx'); | ||
import React from 'react'; | ||
import Map from './src/components/Map'; | ||
@@ -15,81 +14,78 @@ React.render( | ||
Example of using a Google Map (Location: 1600 Amphitheatre Parkway, Mountain View CA United States) | ||
{React.createElement(Map, { | ||
provider: 'google', | ||
mapId: 'googleLocation', | ||
addressLine1: '1600 Amphitheatre Parkway', | ||
city: 'Mountain View', | ||
state: 'CA', | ||
country: 'United States', | ||
zoom: 15, | ||
height: 270, | ||
width: 580 | ||
})} | ||
<Map provider='google' | ||
mapId='googleLocation' | ||
addressLine1='1600 Amphitheatre Parkway' | ||
city='Mountain View' | ||
state='CA' | ||
country='United States' | ||
zoom={15} | ||
height={270} | ||
width={580} | ||
/> | ||
<br /> | ||
Example of using a Google Map (Latitude: 51.477222, Longitude: 0) | ||
{React.createElement(Map, { | ||
provider: 'google', | ||
mapId: 'googleLocation', | ||
latitude: 51.477222, | ||
longitude: 0, | ||
zoom: 15, | ||
height: 270, | ||
width: 580 | ||
})} | ||
<Map provider='google' | ||
mapId='googleLocation' | ||
latitude={51.477222} | ||
longitude={0} | ||
zoom={15} | ||
height={270} | ||
width={580} /> | ||
<br /> | ||
Example of using a Yahoo Map (Location: 701 First Avenue, Sunnyvale CA United States) | ||
{React.createElement(Map, { | ||
provider: 'yahoo', | ||
mapId: 'yahooLocation', | ||
addressLine1: '701 First Avenue', | ||
city: 'Sunnyvale', | ||
state: 'CA', | ||
country: 'United States', | ||
zoom: 15, | ||
height: 270, | ||
width: 580 | ||
})} | ||
<Map | ||
provider='yahoo' | ||
mapId='yahooLocation' | ||
addressLine1='701 First Avenue' | ||
city='Sunnyvale' | ||
state='CA' | ||
country='United States' | ||
zoom={15} | ||
height={270} | ||
width={580} | ||
/> | ||
<br /> | ||
Example of using a Yahoo Map (Latitude: 51.477222, Longitude: 0) | ||
{React.createElement(Map, { | ||
provider: 'yahoo', | ||
mapId: 'yahooLocation', | ||
latitude: 51.477222, | ||
longitude: 0, | ||
zoom: 15, | ||
height: 270, | ||
width: 580 | ||
})} | ||
<Map | ||
provider='yahoo' | ||
mapId='yahooLocation' | ||
latitude={51.477222} | ||
longitude={0} | ||
zoom={15} | ||
height={270} | ||
width={580} | ||
/> | ||
<br /> | ||
Example of using a Bing Map (Location: One Microsoft Way, Redmond WA United States) | ||
{React.createElement(Map, { | ||
provider: 'bing', | ||
providerKey: 'AkcOTa579AYlvB3OsS4N5OpCPsxG2rUiVQibQEwneylAPIuyhAim3paIGLZp7ukc', | ||
mapId: 'bing', | ||
addressLine1: 'One Microsoft Way', | ||
city: 'Redmond', | ||
state: 'WA', | ||
country: 'United States', | ||
zoom: 15, | ||
height: 270, | ||
width: 580 | ||
})} | ||
<Map | ||
provider='bing' | ||
providerKey='AkcOTa579AYlvB3OsS4N5OpCPsxG2rUiVQibQEwneylAPIuyhAim3paIGLZp7ukc' | ||
mapId='bing' | ||
addressLine1='One Microsoft Way' | ||
city='Redmond' | ||
state='WA' | ||
country='United States' | ||
zoom={15} | ||
height={270} | ||
width={580} | ||
/> | ||
<br /> | ||
Example of using a Bing Map (Latitude: 51.477222, Longitude: 0) | ||
{React.createElement(Map, { | ||
provider: 'bing', | ||
providerKey: 'AkcOTa579AYlvB3OsS4N5OpCPsxG2rUiVQibQEwneylAPIuyhAim3paIGLZp7ukc', | ||
mapId: 'bing', | ||
latitude: 51.477222, | ||
longitude: 0, | ||
zoom: 15, | ||
height: 270, | ||
width: 580 | ||
})} | ||
<Map | ||
provider='bing' | ||
providerKey='AkcOTa579AYlvB3OsS4N5OpCPsxG2rUiVQibQEwneylAPIuyhAim3paIGLZp7ukc' | ||
mapId='bing' | ||
latitude={51.477222} | ||
longitude={0} | ||
zoom={15} | ||
height={270} | ||
width={580} | ||
/> | ||
<br /> | ||
</div>, | ||
document.getElementById('content')); |
{ | ||
"name": "react-cartographer", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"description": "Generic React component for displaying static maps using Yahoo, Google or Bing as a map provider.", | ||
@@ -11,2 +11,3 @@ "author": "Edmond Chow <echow23@yahoo-inc.com>", | ||
"scripts": { | ||
"compile": "babel src --out-dir lib", | ||
"lint": "jshint", | ||
@@ -16,6 +17,6 @@ "start": "npm run serve | npm run dev", | ||
"dev": "webpack-dev-server --progress --colors --port 8090", | ||
"test": "jenkins-mocha tests/unit/*", | ||
"devtest": "mocha tests/unit/* --reporter nyan", | ||
"test": "jenkins-mocha --compilers js:babel/register tests/unit/*", | ||
"devtest": "mocha --compilers js:babel/register tests/unit/* --reporter nyan", | ||
"cover": "node node_modules/istanbul/lib/cli.js cover --dir artifacts -- ./node_modules/mocha/bin/_mocha tests/ --recursive --reporter spec", | ||
"prepublish": "grunt babel" | ||
"prepublish": "npm run compile" | ||
}, | ||
@@ -29,2 +30,3 @@ "dependencies": { | ||
"devDependencies": { | ||
"babel": "^5.8.19", | ||
"babel-loader": "^5.3", | ||
@@ -36,4 +38,4 @@ "coveralls": "^2.11.2", | ||
"jenkins-mocha": "^2.2", | ||
"mocha": "2.0.x", | ||
"chai": "1.10.x", | ||
"mocha": "^2.2.5", | ||
"chai": "^3.2.0", | ||
"jshint": "^2.5.5", | ||
@@ -40,0 +42,0 @@ "grunt": "^0.4.5", |
@@ -19,3 +19,7 @@ /** | ||
{ test: /\.json/, loader: 'json-loader' }, | ||
{ test: /\.jsx$/, loader: 'babel-loader' } | ||
{ | ||
test: /\.(js|jsx)$/, | ||
exclude: /node_modules/, | ||
loader: 'babel-loader' | ||
} | ||
] | ||
@@ -22,0 +26,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
985
50657
23
1