Skip to content

Commit

Permalink
Export the "dist" file in npm (#4423)
Browse files Browse the repository at this point in the history
* feature: export the correct js file in npm

* Fix linter

* Update bundler quickstart docs
  • Loading branch information
lucaswoj authored Mar 14, 2017
1 parent e2aa3a1 commit 65336e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/_includes/quickstart-bundler.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<p>Include the following code in the <code>&lt;body&gt;</code> of your HTML file.</p>
<div class='js-replace-token'>
{% copyable %}{% highlight javascript %}
import mapboxgl from 'mapbox-gl/dist/mapbox-gl';
// or "const mapboxgl = require('mapbox-gl/dist/mapbox-gl');"
import mapboxgl from 'mapbox-gl';
// or "const mapboxgl = require('mapbox-gl');"

mapboxgl.accessToken = '<your access token here>';
const map = new mapboxgl.Map({
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mapbox-gl",
"description": "A WebGL interactive maps library",
"version": "0.33.1",
"main": "src/index.js",
"main": "dist/mapbox-gl.js",
"license": "BSD-3-Clause",
"repository": {
"type": "git",
Expand Down Expand Up @@ -113,7 +113,7 @@
"build": "npm run build-docs # invoked by publisher when publishing docs on the mb-pages branch",
"start-docs": "npm run build-min && npm run build-docs && jekyll serve --watch",
"lint": "eslint --ignore-path .gitignore src test bench docs/_posts/examples/*.html debug/*.html",
"lint-docs": "documentation lint",
"lint-docs": "documentation lint src/index.js",
"open-changed-examples": "git diff --name-only mb-pages HEAD -- docs/_posts/examples/*.html | awk '{print \"http://127.0.0.1:4000/mapbox-gl-js/example/\" substr($0,33,length($0)-37)}' | xargs open",
"test": "run-s lint test-unit test-flow",
"test-suite": "run-s test-render test-query",
Expand Down

0 comments on commit 65336e2

Please sign in to comment.