Skip to content

chore: publish ESM only#74

Open
jgravois wants to merge 1 commit intomainfrom
chore/esm
Open

chore: publish ESM only#74
jgravois wants to merge 1 commit intomainfrom
chore/esm

Conversation

@jgravois
Copy link
Copy Markdown
Collaborator

@jgravois jgravois commented Mar 29, 2026

as originally suggested in #34 (comment)

@thomas-hervey can you take v1.0.0-beta.1 for a spin in turf and let me know if you run into any problems?

export { Arc } from './arc.js';
export { GreatCircle } from './great-circle.js';
export { roundCoords, D2R, R2D } from './utils.js';
export { _LineString } from './line-string.js';
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on the filename, i'm guessing that it'd be preferable to stop exporting _LineString publicly.

Copy link
Copy Markdown
Collaborator Author

@jgravois jgravois Mar 29, 2026

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 files whitelist, i'm pretty sure the .npmignore blacklist is irrelevant/redundant.

Comment on lines +342 to +343
<button id="clear" class="btn">Clear All</button>
<button id="reset" class="btn btn-danger">Reset View</button>
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The 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.


<script>
<script type="module">
import { GreatCircle } from 'https://cdn.skypack.dev/arc@1';
Copy link
Copy Markdown
Collaborator Author

@jgravois jgravois Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this won't work until we actually publish v1.0.0.

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';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant