From 41db4c042ccf50ea7baf3d2160ea37dcca37998d Mon Sep 17 00:00:00 2001 From: Robert Kieffer Date: Tue, 2 Nov 2021 17:33:57 -0700 Subject: [PATCH] fix: skypack.dev for direct browser import, fixes #263 --- README.md | 43 +++++++++++++++++-------------------------- src/README_js.md | 43 +++++++++++++++++-------------------------- 2 files changed, 34 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index b08316f2..fc816cbc 100644 --- a/README.md +++ b/README.md @@ -7,16 +7,6 @@ A comprehensive, compact MIME type module. [![Build Status](https://travis-ci.org/broofa/mime.svg?branch=master)](https://travis-ci.org/broofa/mime) -## Version 2 Notes - -Version 2 is a breaking change from 1.x as the semver implies. Specifically: - -* `lookup()` renamed to `getType()` -* `extension()` renamed to `getExtension()` -* `charset()` and `load()` methods have been removed - -If you prefer the legacy version of this module please `npm install mime@^1`. Version 1 docs may be found [here](https://github.com/broofa/mime/tree/v1.4.0). - ## Install ### NPM @@ -28,20 +18,21 @@ npm install mime It is recommended that you use a bundler such as [webpack](https://webpack.github.io/) or [browserify](http://browserify.org/) to -package your code. However, browser-ready versions are available via wzrd.in. -E.g. For the full version: - - - - -Or, for the `mime/lite` version: +package your code. However, browser-ready versions are available via +skypack.dev as follows: +``` +// Full version + +``` - - +``` +// "lite" version + +``` ## Quick Start @@ -58,9 +49,9 @@ See [Mime API](#mime-api) below for API details. ## Lite Version -There is also a "lite" version of this module that omits vendor-specific -(`*/vnd.*`) and experimental (`*/x-*`) types. It weighs in at ~2.5KB, compared -to 8KB for the full version. To load the lite version: +The "lite" version of this module omits vendor-specific (`*/vnd.*`) and +experimental (`*/x-*`) types. It weighs in at ~2.5KB, compared to 8KB for the +full version. To load the lite version: ```javascript const mime = require('mime/lite'); diff --git a/src/README_js.md b/src/README_js.md index 21e2df24..ffcf9969 100644 --- a/src/README_js.md +++ b/src/README_js.md @@ -7,16 +7,6 @@ A comprehensive, compact MIME type module. [![Build Status](https://travis-ci.org/broofa/mime.svg?branch=master)](https://travis-ci.org/broofa/mime) -## Version 2 Notes - -Version 2 is a breaking change from 1.x as the semver implies. Specifically: - -* `lookup()` renamed to `getType()` -* `extension()` renamed to `getExtension()` -* `charset()` and `load()` methods have been removed - -If you prefer the legacy version of this module please `npm install mime@^1`. Version 1 docs may be found [here](https://github.com/broofa/mime/tree/v1.4.0). - ## Install ### NPM @@ -28,20 +18,21 @@ npm install mime It is recommended that you use a bundler such as [webpack](https://webpack.github.io/) or [browserify](http://browserify.org/) to -package your code. However, browser-ready versions are available via wzrd.in. -E.g. For the full version: - - - - -Or, for the `mime/lite` version: +package your code. However, browser-ready versions are available via +skypack.dev as follows: +``` +// Full version + +``` - - +``` +// "lite" version + +``` ## Quick Start @@ -58,9 +49,9 @@ See [Mime API](#mime-api) below for API details. ## Lite Version -There is also a "lite" version of this module that omits vendor-specific -(`*/vnd.*`) and experimental (`*/x-*`) types. It weighs in at ~2.5KB, compared -to 8KB for the full version. To load the lite version: +The "lite" version of this module omits vendor-specific (`*/vnd.*`) and +experimental (`*/x-*`) types. It weighs in at ~2.5KB, compared to 8KB for the +full version. To load the lite version: ```javascript const mime = require('mime/lite');