Skip to content

Commit

Permalink
Note CSS in npm installation instructions (#4021)
Browse files Browse the repository at this point in the history
* Note CSS in npm installation instructions

I saw that there was no mention of the required CSS file outside of the "Using Mapbox GL JS with a `<script>` tag" section. I thought it might be a good idea to include it in each installation section, for readers who are skipping to the section that concerns them.

* Add node_modules to CSS paths

* Update README.md
  • Loading branch information
davidtheclark authored and Lucas Wojciechowski committed Jan 20, 2017
1 parent 54b0e2f commit 81d6715
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -62,6 +62,8 @@ var map = new mapboxgl.Map({
});
```

Add the CSS file at `node_modules/mapbox-gl/dist/mapbox-gl.css` or `https://api.tiles.mapbox.com/mapbox-gl-js/v0.31.0/mapbox-gl.css`.

## Using Mapbox GL JS with other module systems

Since our build system depends on Browserify, to use Mapbox GL with any other module bundlers like [Webpack](https://webpack.github.io/), [SystemJS](https://github.com/systemjs/systemjs), you have to require the distribution build instead of the package entry point:
Expand All @@ -76,6 +78,8 @@ If you're using the ES6 module system (e.g. with [Rollup](https://github.com/rol
import mapboxgl from 'mapbox-gl/dist/mapbox-gl.js';
```

Add the CSS file at `node_modules/mapbox-gl/dist/mapbox-gl.css` or `https://api.tiles.mapbox.com/mapbox-gl-js/v0.31.0/mapbox-gl.css`.

## Third Party Projects

These projects are written and maintained by the GL JS community. Feel free to open a PR add your own projects to this list. We :heart: third party projects!
Expand Down

0 comments on commit 81d6715

Please sign in to comment.