npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

generator-esri-leaflet-demo

v0.0.1

Published

Example app using Backbone, Marionette and Esri-Leaflet along with a grunt-based toolchain.

Downloads

9

Readme

generator-esri-leaflet-demo

Hello! This little site was generated using yeoman, and serves as an example for how to build out non-trivial web applications with maps.

Overview

So - here's the thing - you're gonna look at this app and be all "Wha? This is a mountain of files, for a very very simple one page thing!". And you are completely correct.

However, the upside of this particular pattern is that you can build out a very complex application using this same, relatively simple structure. Put another way: Spagetti Code Does Not Scale.

Starting the App

Once you're run the scaffolder, start it up by running grunt serve. This will start up a local node (express) server to host your app. It will also start a bunch of watch tasks, which will tell the browser to reload when you save any file. Handy when developing in a single browser, but priceless when debugging across 3 local browsers, and a few mobile devices.

Separation of Concerns

One key patter is the separation of concerns around the application, and in particular separating the map logic and details from the applicatin logic. We do this by putting all the map-specific behavior into a Map Controller. The other modules in the application do not have direct refernces to the Map Controller. Instead, they use the Marionette event system to request map actions. Similarly, the Marionette event system is used by the Map Controller to raise map related events into the application. Care should be taken to avoid implementation-specific details leaking into the main application. That said, it does happen from time to time, but it's something we try to avoid (while also not going insane over-engineering demo apps!)

Automated Tests

This demo skipped over getting tests running, but the infrastructure is in place. Simply cd into the test folder, then run bower install. This will bring down a few test dependencies, including grunt-contrib-jasmine.

With that in place, you can run grunt jasmine, and that will execute the single spec that is setup for home_module.js. From there, check out Jasmine Documentation for more details on writing tests.

License

MIT