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

Update community polyfills and tooling list #231

Merged
merged 2 commits into from
Oct 23, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -546,18 +546,17 @@ The primary challenges here are in achieving agreement about built-in modules on

Several members of the community have been working on polyfills and tooling related to import maps. Here are the ones we know about:

* [@import-maps/generate](https://www.npmjs.com/package/@import-maps/generate) generates an import map from your `yarn.lock`.
* [@import-maps/resolve](https://www.npmjs.com/package/@import-maps/resolve) resolves a specifier relative to an import map.
* [@jsenv/node-module-import-map](https://www.npmjs.com/package/@jsenv/node-module-import-map) generates an import map from your `package.json` and `node_modules/` directories.
* [Snowpack](https://www.snowpack.dev) generates an import map when it installs your npm packages to run on the web.
* [Built-in Module Demo (with Rollup)](https://glitch.com/edit/#!/rollup-built-in-modules) contains code for a [Rollup](https://rollupjs.org/) plugin that generates an import map, focused on built-in module polyfills.
* [@jsenv/importmap-eslint-resolver](https://www.npmjs.com/package/@jsenv/importmap-eslint-resolver) enables import map resolution in [ESLint](https://eslint.org/)
Copy link
Contributor

Choose a reason for hiding this comment

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

Good for me.

For the record I have updated @jsenv/importmap-eslint-resolver readme to make it better, thanks for the link ;)

* [Deno](https://github.com/denoland/deno) is a JavaScript/TypeScript runtime with [built-in support for import maps](https://deno.land/manual/linking_to_external_code/import_maps).
* [es-dev-server](https://www.npmjs.com/package/es-dev-server) allows using import maps during development, including polyfills.
Copy link

Choose a reason for hiding this comment

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

Suggested change
* [es-dev-server](https://www.npmjs.com/package/es-dev-server) allows using import maps during development, including polyfills.
* [web-dev-server](https://www.npmjs.com/package/@web/dev-server) allows using import maps during development, including polyfills.
* [web-test-runner](https://www.npmjs.com/package/@web/test-runner) while testing you can mock external es modules via import maps

for reference some docs for Web Test Runner regarding mocking
https://modern-web.dev/docs/test-runner/writing-tests/mocking/

Choose a reason for hiding this comment

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

To clarify: web-dev-server is the successor of es-dev-server :) We have a dedicated import map plugin for both the dev server and the test runner: https://modern-web.dev/docs/dev-server/plugins/import-maps/

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks! I'll consolidate these into a link to https://www.npmjs.com/package/@web/dev-server-import-maps

* [es-module-shims](https://github.com/guybedford/es-module-shims) provides an import maps polyfill for browsers with basic ES modules support.
* [import-map-deployer](https://github.com/single-spa/import-map-deployer) is designed for updating import map files from CI
* [import-map-overrides](https://www.npmjs.com/package/import-map-overrides) allows using import maps to improve development flow by pointing to local versions.
* [importly](https://www.npmjs.com/package/importly) generates an import map from a `package.json`.
* [SystemJS](https://github.com/systemjs/systemjs) provides a polyfill-like workflow for using import maps in older browsers with the System module format and `<script type="systemjs-importmap">`.
* [rollup-plugin-index-html](https://www.npmjs.com/package/rollup-plugin-index-html) is a [Rollup](https://rollupjs.org/) plugin for working with HTML files, which will use import maps that it finds in the HTML.
* [webpack-import-map-plugin](https://www.npmjs.com/package/webpack-import-map-plugin) generates import maps for the output of [webpack](https://webpack.js.org/), especially useful for the [hashing use case](#mapping-away-hashes-in-script-filenames)

Feel free to send a pull request with more! Also, you can use [#146](https://github.com/WICG/import-maps/issues/146) in the issue tracker for discussion about this space.

Expand Down