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

hapi-tilemill

v0.10.3

Published

A fork of Tilemill from Mapbox (Hapi plugin)

Downloads

1

Readme

TileMill is a modern map design studio powered by Node.js and Mapnik.

This fork uses TileMill as a Hapi plugin and has customizations made for the CLIMA project (CCIAM research group, Faculdade de Ciencias da Universidade de Lisboa).

Quick start (Ubuntu)

Install the dependencies: sudo npm install

Launch TileMill: ./index.js. This will try to start TileMill as a desktop app (using the topcube module for the client window). If there is no graphical environment it will start only in server mode. In that case we can access TileMill using the browser: http://localhost:20009/

TileMill has several main commands (or "modes"): start, core, export, test and tile. Example: ./index.js start

Each of these commands has specific options. Read more details about the options of each command with ./index <command> --help

The main configuration file will be created the first time TileMill is started. It is located in ~/.tilemill/config.json.

Alternatively, the configuration options in that file can be given in the command line:

  • --server=true: launch as server-only service (prevents the UI from opening)

Example: ./index.js start --server=true

More informations about running TileMill as a Ubuntu service: https://www.mapbox.com/tilemill/docs/guides/ubuntu-service/

Build Status

Build Status Build status Dependencies

Key modules

  • mapnik - Build Status
  • node-mapnik - Build Status
  • carto - Build Status
  • tilelive.js - Build Status
  • tilelive-mapnik - Build Status
  • millstone - Build Status
  • node-mbtiles - Build Status
  • node-sqlite3 - Build Status

Depends

  • Mapnik v2.3.0
  • Node.js v0.10.x or v0.8.x
  • Protobuf: libprotobuf-lite and protoc

However, node-mapnik (which depends on Mapnik and protobuf) is now packaged as a binary. So, you do not need an external Mapnik. See Installation

Installation

To install from source just do:

git clone https://github.com/mapbox/tilemill.git
cd tilemill
npm install

Then to start TileMill do:

./index.js # and then view http://localhost:20009 in your web browser

For more extended details follow:

Running tests

Install mocha and run the tests

npm install mocha
npm test

Note: the tests require a running postgres server and a postgis enabled database called template_postgis.

If you do not have a template_postgis create one like:

createdb -E UTF8 template_postgis
psql -c "CREATE EXTENSION postgis" template_postgis

If you experience failing tests here are two tips:

  1. Debug the project data by running TileMill with

    ./index.js --files=./test/fixtures/files/

  2. Try clearing the cache of test data:

    rm -rf ./test/fixtures/files/

For more info see: http://postgis.net/docs/manual-1.5/ch02.html

Documentation

TileMill documentation is kept in the mb-pages branch, which is independently managed and not merged with master.

TileMill's in-app reference available as the "Manual" (see below for syncing details) is a very small subset of docs for offline usage and is manually sync'ed from the mb-pages branch.

To view all the TileMill documentation locally, first checkout the mb-pages branch:

git checkout mb-pages

Then install Jekyll:

sudo gem install jekyll

And run Jekyll:

jekyll

Once Jekyll has started you should be able to view the docs in a browser at:

http://localhost:4000/tilemill/

Syncing manual

To sync the manual with mb-pages updates do:

export TILEMILL_SOURCES=`pwd`
cd ../
git clone --depth=1 -b mb-pages https://github.com/mapbox/tilemill tilemill-mb-pages
cd ${TILEMILL_SOURCES}
export TILEMILL_GHPAGES=../tilemill-mb-pages
rm -rf ${TILEMILL_SOURCES}/assets/manual
mkdir -p ${TILEMILL_SOURCES}/assets/manual
cp -r ${TILEMILL_GHPAGES}/assets/manual/* ${TILEMILL_SOURCES}/assets/manual/
git add ${TILEMILL_SOURCES}/assets/manual/*
rm -rf ${TILEMILL_SOURCES}/_posts/docs/reference
mkdir -p ${TILEMILL_SOURCES}/_posts/docs/reference
cp -r ${TILEMILL_GHPAGES}/_posts/docs/reference/* ${TILEMILL_SOURCES}/_posts/docs/reference/
git add ${TILEMILL_SOURCES}/_posts/docs/reference/*