Created
December 13, 2012 03:39
-
-
Save springmeyer/4273828 to your computer and use it in GitHub Desktop.
Install Carto.js (CartoCSS compiler written in Javascript) to use from the command line on OS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First install the latest version of Node.js if you don't already have node.js v0.8.x | |
# WARNING: do not use the .pkg installer for node. A bug in the installer will break | |
# later installs causing errors like "no suitable image found. Did find: /path/to/some/lib: mach-o, but wrong architecture" | |
# install node either from source or from homebrew. Here we use homebrew: | |
brew install node | |
# Then make sure /usr/local/bin is on your PATH | |
export PATH=/usr/local/bin:$PATH | |
# Next install carto globally with the -g flag | |
npm install -g carto millstone | |
# Then, if you've used homebrew to install node/npm put the bin directory on your path | |
export PATH=/usr/local/share/npm/bin/:$PATH | |
# Make sure it installed okay: | |
$ carto -v | |
carto 0.9.4 (Carto map stylesheet compiler) | |
# Make sure compiling MSS styles are working: | |
$ echo 'Map {}' > style.mss | |
$ carto style.mss | |
<Style name="layer" filter-mode="first" > | |
</Style> | |
# Then compile your tilemill project to mapnik xml | |
$ carto ~/Documents/MapBox/project/your_map/project.mml > mapnik.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment