Skip to content
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

Request to change the name of default importmap from node.importmap to importmap.json #29

Open
JayaKrishnaNamburu opened this issue Jan 12, 2024 · 0 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@JayaKrishnaNamburu
Copy link
Member

JayaKrishnaNamburu commented Jan 12, 2024

There is a little bit of disconnect between the cli and using the node-loader.

When we generate an importmap using jspm-cli. It creates an importmap using importmap.json as a default name.
https://github.com/jspm/jspm-cli/blob/b938c175ae040bd8af96a2e60179c4f9c837e008/src/utils.ts#L11

// Default import map to use if none is provided:
const defaultInputPath = "./importmap.json";

But the @jspm/node-importmap-loader expects the default file to be node.importmap
https://github.com/jspm/node-importmap-http-loader/blob/main/src/config.ts#L21

export const nodeImportMapPath = join(root, "node.importmap");

So, when users create a new map using the cli. They have two options.

  • Manually change the name of the file from importmap.json to node.importmap. Since the loader doesn't accept the file-name to be passed as an argument as of now.
  • Or while creating the importmap using the cli, they need to pass a flag --output node.importmap to avoid manual step.

This creates a little friction and users need to remember about the file name mis-match. To avoid this, the node loader should use importmap.json by default. Since cli is much used and impact more changes there.

Task

  • Change the default to importmap.json
  • Update all the tests and examples to use importmap.json
@JayaKrishnaNamburu JayaKrishnaNamburu added the good first issue Good for newcomers label Jan 12, 2024
@yowainwright yowainwright self-assigned this Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants