Skip to content

Commit b4041b7

Browse files
authored
Exporting ES Modules only (#120)
* feat: exporting ES Modules only * chore: update dependencies
1 parent fbd56fc commit b4041b7

7 files changed

Lines changed: 252 additions & 3862 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run: |
4040
npm ci --quiet
4141
42-
- name: Publish to npm (Prereleae)
42+
- name: Publish to npm (Prerelease)
4343
if: contains(github.ref, '-') == true
4444
run: |
4545
npm config list

README.md

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@
3434
- [Install](#install)
3535
- [Usage](#usage)
3636
- [TypeScript or ES Modules](#typescript-or-es-modules)
37-
- [Node.js](#nodejs)
3837
- [Browser](#browser)
39-
- [ES Modules](#es-modules)
40-
- [UMD](#umd)
4138
- [Demo](#demo)
4239
- [deno](#deno)
4340
- [API Reference](#api-reference)
@@ -49,15 +46,16 @@
4946

5047
## Pre-requisite
5148

52-
- [Node.js][node-js-url] >= 10.18.1
53-
- [NPM][npm-url] >= 6.13.4 ([NPM][npm-url] comes with [Node.js][node-js-url] so there is no need to install separately.)
49+
- [Node.js][node-js-url] >= 14.17.3
50+
- [NPM][npm-url] >= 6.14.13 ([NPM][npm-url] comes with [Node.js][node-js-url] so there is no need to install separately.)
51+
- [ES Modules]
5452

5553

5654
## Install
5755

5856
```sh
5957
# Install via NPM
60-
$ npm install --save normalize-diacritics
58+
$ npm i normalize-diacritics
6159
```
6260

6361
## Usage
@@ -71,34 +69,12 @@ import { normalize } from 'normalize-diacritics';
7169
await normalize('söme stüff with áccènts'); // 'some stuff with accents'
7270
```
7371

74-
### Node.js
75-
76-
```js
77-
const { normalize } = require('normalize-diacritics');
78-
79-
/** Assuming top-level await is enabled... */
80-
await normalize('söme stüff with áccènts'); // 'some stuff with accents'
81-
```
82-
8372
### Browser
8473

85-
#### ES Modules
86-
8774
```html
8875
<script type="module">
89-
import { normalize } from 'https://unpkg.com/normalize-diacritics@latest/dist/normalize-diacritics.min.js';
90-
91-
// --snip
92-
</script>
93-
```
94-
95-
#### UMD
96-
97-
```html
98-
<script src="https://unpkg.com/normalize-diacritics@latest/dist/normalize-diacritics.umd.min.js"></script>
99-
<script>
100-
const { normalize } = window.NormalizeDiacritics;
101-
76+
import { normalize } from 'https://cdn.skypack.dev/normalize-diacritics@latest';
77+
10278
// --snip
10379
</script>
10480
```
@@ -142,6 +118,7 @@ Please note that this project is released with a [Contributor Code of Conduct][c
142118
[unpkg-url]: https://unpkg.com/normalize-diacritics@latest/dist/
143119
[deno]: https://github.com/denoland/deno
144120
[deno_mod/normalize_diacritics]: https://github.com/motss/deno_mod/tree/master/normalize_diacritics
121+
[ES Modules]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
145122

146123
<!-- MDN -->
147124
[map-mdn-url]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map

0 commit comments

Comments
 (0)