Skip to content

Define main entrypoint for use as Node package#148

Merged
aduth merged 1 commit intomasterfrom
aduth-main-entry-point
Jul 24, 2020
Merged

Define main entrypoint for use as Node package#148
aduth merged 1 commit intomasterfrom
aduth-main-entry-point

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Jul 24, 2020

Why: To be able to import identity-style-guide from another script, it must define a main entrypoint.

Before After
import 'identity-style-guide/dist/assets/js/main'; import 'identity-style-guide';

Example: 18F/identity-idp#3957

Reference: https://docs.npmjs.com/files/package.json#main

Compare upstream: https://github.com/uswds/uswds/blob/f7acaf7e09840f4f84b1398c4d30a977cd7fc1e5/package.json#L8

See resolution failure example: https://unpkg.com/identity-style-guide

**Why**: To be able to import identity-style-guide from another script, it must define a main entrypoint.
@aduth aduth added the javascript Pull requests that update Javascript code label Jul 24, 2020
Copy link
Contributor

@juliasolorzano juliasolorzano left a comment

Choose a reason for hiding this comment

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

🚀

@aduth aduth merged commit 608e3f9 into master Jul 24, 2020
@aduth aduth deleted the aduth-main-entry-point branch July 24, 2020 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants