Skip to content

Commit d810e4e

Browse files
authored
Merge pull request #11 from kieranbarker/dev
Replace main field with browser field in package.json and fix incorrect documentation
2 parents fcced64 + 888135c commit d810e4e

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

README.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ tinyDOM also supports modern browsers and module bundlers (Rollup, Webpack, Snow
3434
import { TinyDOM as $ } from 'https://cdn.jsdelivr.net/npm/tiny-dom@2/dist/tinydom.es.min.js';
3535
```
3636

37-
### npm
37+
### CommonJS
3838

39-
You can also use npm (or your favourite package manager). First, install the package via the command line.
39+
You can also use npm. First, install the package via the command line.
4040

4141
```shell
4242
npm i tiny-dom
@@ -45,15 +45,7 @@ npm i tiny-dom
4545
Then import the package.
4646

4747
```js
48-
import { TinyDOM as $ } from 'tiny-dom';
49-
```
50-
51-
### CommonJS
52-
53-
If you use Node.js, you can import TinyDOM using the `require()` method with the `.cjs` version.
54-
55-
```js
56-
const { TinyDOM: $ } = require('https://cdn.jsdelivr.net/npm/tiny-dom@2/dist/tinydom.cjs.min.js');
48+
const { TinyDOM: $ } = require('tiny-dom');
5749
```
5850

5951
### AMD

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
22
"name": "tiny-dom",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "A tiny DOM manipulation library written in ES6 with zero dependencies.",
5-
"main": "./dist/tinydom.cjs.min.js",
5+
"browser": "./dist/tinydom.cjs.min.js",
66
"module": "./dist/tinydom.es.min.js",
7-
"browser": "./dist/tinydom.min.js",
87
"scripts": {
98
"test": "npx jest --coverage",
109
"build": "npx rollup --config"

0 commit comments

Comments
 (0)