This repository contains the source code for the Esri Leaflet API Reference, sample code and tutorials found at https://esri.github.io/esri-leaflet.
- Clone this repository.
npm install -g grunt-cli
npm install
- Create a new file,
data/secret.json
to include an API Key:{ "api_key": "YOUR API KEY HERE" }
npm start
In order to update the version of Leaflet, Esri Leaflet or any other plugin displayed in the documentation site:
- Find and update the appropriate library version listed in
package.json
devDependency. - Rerun
npm install
. - Run
npm run integrity
(to generate a corresponding Subresource Integrity hash). - Run
npm start
to confirm locally that this achieved the desired effect. - Send a Pull Request!
Before committing, run npm test
, which will run ESLint (enforcing the Semistandard style) on all our sample code to ensure the samples are consistently formatted.
File changes will be watched and also linted with ESLint if you have run npm start
prior to editing the samples.
If you're using VS Code and the ESLint Extension, you can create a new file at .vscode/settings.json
with the following contents to enable live linting on the HBS files:
{
"eslint.validate": [
"javascript",
"javascriptreact",
"handlebars"
]
}
If you're working on changes to esri-leaflet locally and want to see those changes within the context of the documentation site:
- Run
npm start
in theesri-leaflet
project. This will host the built esri-leaflet file athttp://localhost:5000/dist/esri-leaflet-debug.js
or similar. - In this repository, in
\data\devSiteData.json
, set thelocalSource
property totrue
and set thelocalSourceUrl
property to the full url of youresri-leaflet-debug.js
file if it's not the same as above. - Run
npm start
in this project, and the documentation site will be hosted but load theesri-leaflet
library locally instead of the CDN version.
Find a typo or other problem on the website? Please let us know by submitting an issue.
Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.
Copyright © 2015-2019 Esri
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
A copy of the license is available in the repository's LICENSE file.