Repository navigation
feature: export the correct js file in npm - #4391
Closed
BernhardRode wants to merge 2 commits into
Closed
BernhardRode wants to merge 2 commits into
BernhardRode wants to merge 2 commits into
Conversation
Contributor
|
Our docs suggest using That said, I’m leaning towards 👍 on this. It’d make Any thoughts @jfirebaugh? @BernhardRode You'll need to fix the CI build & ensure npm publish still works. |
Contributor
mourner
requested changes
Mar 10, 2017
mourner
left a comment
Member
There was a problem hiding this comment.
👍 Let's fix the CI build, then merge.
Contributor
|
CI fix: diff --git a/package.json b/package.json
index c5b97fc..88338ee 100644
--- a/package.json
+++ b/package.json
@@ -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", |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When installing mapbox-gl via npm and importing the library like:
import * as mapboxgl from 'mapbox-gl';
The npm resolver is looking for tha main attribute in package.json to further resolve the correct JavaScript file for import.
fixes #3551