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

Rollup and class #14

Merged
merged 5 commits into from Aug 19, 2016
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -47,7 +47,7 @@ Here is a quick example to get you started.
var map = L.map('map').setView([ 40.706, -73.926], 14);

L.esri.basemapLayer('Gray').addTo(map);
L.esri.Heat.heatmapFeatureLayer({
L.esri.Heat.featureLayer({
url: 'http://services.arcgis.com/rOo16HdIMeOBI4Mb/ArcGIS/rest/services/Graffiti_Reports/FeatureServer/0',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets bump the cdn version in the README code sample too.

<!-- leaflet 1.0.0-rc.3 -->
<!-- esri-leaflet 2.0.2 -->
<script src="//cdn.jsdelivr.net/leaflet.esri.heatmap/2.0.0/esri-leaflet-heatmap.js"></script>

radius: 12
}).addTo(map);
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Expand Up @@ -3,8 +3,8 @@
"version": "v2.0.0-beta.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets get rid of the bower.json version (see: Esri/esri-leaflet#829 for more info)

"main": "dist/esri-leaflet-heatmap-feature-layer.js",
"dependencies": {
"leaflet": "^1.0.0-beta.1",
"esri-leaflet": "^2.0.0-beta.4",
"esri-leaflet": "^2.0.0",
"leaflet": "^1.0.0-rc.3",
"leaflet.heat": "^0.1.3"
Copy link
Contributor

@jgravois jgravois Aug 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you bump leaflet.heat to "^0.2.0" please?
i just noticed some erratic shifting of the heatmap on pan/zoom with 0.1.3.

},
"ignore": [
Expand Down
8 changes: 4 additions & 4 deletions debug/sample.html
Expand Up @@ -16,7 +16,7 @@
<script src="../node_modules/esri-leaflet/dist/esri-leaflet.js"></script>

<!-- load heatmap feature layer source for debugging -->
<script src="../dist/esri-leaflet-heatmap-feature-layer.js"></script>
<script src="../dist/esri-leaflet-heatmap-debug.js"></script>

<style>
body {
Expand Down Expand Up @@ -52,14 +52,14 @@

<script>
/*
make a copy of this file in the same file if you'd like git to ignore your local changes
make a copy of this file in the same directory if you'd like git to ignore your local changes
*/

var map = L.map('map').setView([ 40.706, -73.926], 14);

L.esri.basemapLayer('Gray').addTo(map);
L.esri.Heat.heatmapFeatureLayer({
url: 'http://services.arcgis.com/rOo16HdIMeOBI4Mb/ArcGIS/rest/services/Graffiti_Reports/FeatureServer/0',
L.esri.Heat.featureLayer({
url: 'https://services.arcgis.com/rOo16HdIMeOBI4Mb/ArcGIS/rest/services/Graffiti_Reports/FeatureServer/0',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch (moving to 'https')

radius: 12
}).addTo(map);
</script>
Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Expand Up @@ -17,7 +17,7 @@ module.exports = function (config) {
'node_modules/leaflet.heat/dist/leaflet-heat.js',
'node_modules/esri-leaflet/dist/esri-leaflet.js',
'spec/**/*Spec.js',
'dist/esri-leaflet-heatmap-feature-layer.js'
'dist/esri-leaflet-heatmap.js'
],

// list of files to exclude
Expand Down
46 changes: 16 additions & 30 deletions package.json
Expand Up @@ -3,76 +3,62 @@
"description": "Esri Leaflet plugin for visualizing Feature Layers as heatmaps with L.heat.",
"version": "2.0.0-beta.1",
"author": "Patrick Arlt <parlt@esri.com> (http://patrickarlt.com)",
"browserify": {
"transform": [
[
"babelify",
{
"whitelist": [
"es6.modules"
],
"loose": [
"es6.modules"
]
}
]
]
},
"contributors": [
"Patrick Arlt <parlt@esri.com> (http://patrickarlt.com)",
"John Gravois <jgravois@esri.com> (http://johngravois.com)"
],
"dependencies": {
"leaflet": "^1.0.0-beta.1",
"esri-leaflet": "^2.0.0-beta.4",
"esri-leaflet": "^2.0.0",
"leaflet": "^1.0.0-rc.3",
"leaflet.heat": "^0.1.3"
},
"devDependencies": {
"babelify": "^6.1.3",
"chai": "2.3.0",
"gh-release": "^2.0.0",
"http-server": "^0.9.0",
"isparta": "^3.0.3",
"istanbul": "gotwarlost/istanbul.git#source-map",
"istanbul": "^0.4.2",
"karma": "^0.12.24",
"karma-chai-sinon": "^0.1.3",
"karma-coverage": "douglasduteil/karma-coverage#next",
"karma-coverage": "^0.5.3",
"karma-mocha": "^0.1.0",
"karma-mocha-reporter": "^0.2.5",
"karma-phantomjs-launcher": "^0.1.4",
"karma-sourcemap-loader": "^0.3.5",
"mkdirp": "^0.5.1",
"node-sass": "^3.2.0",
"phantomjs": "^1.9.17",
"rollup": "^0.10.0",
"rollup": "^0.25.4",
"rollup-plugin-json": "^2.0.0",
"rollup-plugin-node-resolve": "^1.4.0",
"rollup-plugin-uglify": "^0.3.1",
"semistandard": "^7.0.2",
"sinon": "^1.11.1",
"sinon-chai": "2.7.0",
"uglify-js": "^2.4.23"
"snazzy": "^2.0.1",
"watch": "^0.17.1"
},
"homepage": "https://github.com/Esri/esri-leaflet-heatmap-feature-layer",
"jsnext:main": "src/HeatmapFeatureLayer.js",
"jspm": {
"files": [
"src/*.js",
"dist/*"
],
"registry": "npm",
"format": "es6"
},
"license": "Apache-2.0",
"main": "src/HeatmapFeatureLayer.js",
"main": "dist/esri-leaflet-heatmap-debug.js",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git@github.com:Esri/esri-leaflet-heatmap-feature-layer.git"
},
"scripts": {
"prebuild": "mkdirp dist",
"build": "./scripts/build.js",
"lint": "semistandard src/*.js && semistandard spec/*.js",
"build": "rollup -c profiles/debug.js & rollup -c profiles/production.js",
"lint": "semistandard src/*.js && semistandard spec/*.js | snazzy",
"prepublish": "npm run build",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jspm needs a main: too.

"pretest": "npm run build",
"release": "./scripts/release.sh",
"release": "node ./scripts/release.sh",
"start": "watch 'npm run build' src & http-server -p 6789 -c-1 -o",
"test": "npm run lint && karma start"
}
}
6 changes: 6 additions & 0 deletions profiles/base.js
@@ -0,0 +1,6 @@
import config from '../node_modules/esri-leaflet/profiles/base.js';

config.entry = 'src/HeatmapFeatureLayer.js';
config.moduleName = 'L.esri.Heat';

export default config;
6 changes: 6 additions & 0 deletions profiles/debug.js
@@ -0,0 +1,6 @@
import config from './base.js';

config.dest = 'dist/esri-leaflet-heatmap-debug.js';
config.sourceMap = 'inline';

export default config;
10 changes: 10 additions & 0 deletions profiles/production.js
@@ -0,0 +1,10 @@
import uglify from 'rollup-plugin-uglify';
import config from './base.js';

config.dest = 'dist/esri-leaflet-heatmap.js';
config.sourceMap = 'dist/esri-leaflet-heatmap.js.map';

// use a Regex to preserve copyright text
config.plugins.push(uglify({ output: { comments: /Institute, Inc/ } }));

export default config;
50 changes: 0 additions & 50 deletions scripts/build.js

This file was deleted.

2 changes: 1 addition & 1 deletion spec/HeatmapFeatureLayerSpec.js
Expand Up @@ -17,7 +17,7 @@ describe('HeatmapFeatureLayer', function () {
var map = createMap();

beforeEach(function () {
layer = L.esri.Heat.heatmapFeatureLayer({
layer = L.esri.Heat.featureLayer({
url: 'http://services.arcgis.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0',
timeField: 'time'
});
Expand Down
10 changes: 5 additions & 5 deletions src/HeatmapFeatureLayer.js
@@ -1,9 +1,9 @@
export var VERSION = '2.0.0-beta.1';
export { version as VERSION } from '../package.json';

import L from 'leaflet';
import { FeatureManager } from 'esri-leaflet';

export var HeatmapFeatureLayer = FeatureManager.extend({
export var FeatureLayer = FeatureManager.extend({
/**
* Constructor
*/
Expand Down Expand Up @@ -87,8 +87,8 @@ export var HeatmapFeatureLayer = FeatureManager.extend({

});

export function heatmapFeatureLayer (options) {
return new HeatmapFeatureLayer(options);
export function featureLayer (options) {
return new FeatureLayer(options);
}

export default heatmapFeatureLayer;
export default featureLayer;