-
Notifications
You must be signed in to change notification settings - Fork 66
chore: publish ESM only #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| .DS_store | ||
| node_modules | ||
| coverage | ||
| dist/ | ||
| arc.js | ||
| dist |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,6 @@ | |
| <title>arc.js - Great Circle Routes Demo</title> | ||
| <link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin="" /> | ||
| <script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script> | ||
| <script src="./arc.js"></script> | ||
| <style> | ||
| * { | ||
| box-sizing: border-box; | ||
|
|
@@ -340,8 +339,8 @@ <h3>Settings</h3> | |
| </div> | ||
|
|
||
| <div class="control-group"> | ||
| <button class="btn" onclick="clearMap()">Clear All</button> | ||
| <button class="btn btn-danger" onclick="resetView()">Reset View</button> | ||
| <button id="clear" class="btn">Clear All</button> | ||
| <button id="reset" class="btn btn-danger">Reset View</button> | ||
|
Comment on lines
+342
to
+343
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since modules avoid polluting the global scope, we have to wire up the click handlers slightly differently. |
||
| </div> | ||
| </div> | ||
|
|
||
|
|
@@ -357,8 +356,9 @@ <h4>Generated GeoJSON</h4> | |
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <script> | ||
| <script type="module"> | ||
| import { GreatCircle } from 'https://cdn.skypack.dev/arc@1'; | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this won't work until we actually publish in the interim, either of the two below should work: import { GreatCircle } from 'https://cdn.skypack.dev/-/arc@v1.0.0-beta.1';
import { GreatCircle } from './dist/index.js'; |
||
|
|
||
| // Initialize map | ||
| var map = L.map('map').setView(new L.LatLng(0, 0), 2); | ||
| var idx = 1; | ||
|
|
@@ -468,7 +468,7 @@ <h4>Generated GeoJSON</h4> | |
| distance: calculateDistance(from, to) | ||
| }; | ||
|
|
||
| var greatCircle = new arc.GreatCircle(from, to, properties); | ||
| var greatCircle = new GreatCircle(from, to, properties); | ||
| var gc = greatCircle.Arc(npoints, { offset: offset }); | ||
| var line = new L.geoJson().addTo(map); | ||
| var geojson_feature = gc.json(); | ||
|
|
@@ -591,7 +591,7 @@ <h4>Generated GeoJSON</h4> | |
| }; | ||
|
|
||
| try { | ||
| var greatCircle = new arc.GreatCircle(nyc, london, properties); | ||
| var greatCircle = new GreatCircle(nyc, london, properties); | ||
| var gc = greatCircle.Arc(npoints, { offset: offset }); | ||
| var line = new L.geoJson().addTo(map); | ||
| var geojson_feature = gc.json(); | ||
|
|
@@ -629,6 +629,9 @@ <h4>Generated GeoJSON</h4> | |
|
|
||
| // Initialize JSON output | ||
| updateJsonOutput(); | ||
|
|
||
| document.querySelector('#clear').addEventListener('click', clearMap); | ||
| document.querySelector('#reset').addEventListener('click', resetView); | ||
| </script> | ||
| </body> | ||
| </html> | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| module.exports = { | ||
| export default { | ||
| // Use ts-jest preset for TypeScript support | ||
| preset: 'ts-jest', | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since the package.json has a
fileswhitelist, i'm pretty sure the .npmignore blacklist is irrelevant/redundant.