Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit eab0177

Browse files
committed
bump 1.0.13
(1) fix wrong html strcuture (missing > in div) (2) inject version into index.js (no more bundle of package.json) (3) add addition build for global only injection
1 parent add6091 commit eab0177

14 files changed

+266
-437
lines changed

Diff for: README.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,21 @@ Installation
1010

1111
npm i json-pollock --save
1212

13-
There are two ways to consume this package -
13+
In the `dist` folder you'll find a several files:
1414

15-
**As a bundle:** You should use `dist/json-pollock.bundle.min.js` - once you import it into your code it will inject the needed styles into your page header - no additional action is needed from your side.
15+
`json-pollock.bundle.min.js` - this script bundle both package and styles, once you import it into your code it will inject the needed styles into your page header - no additional action is needed from your side. it is also supports umd - meaning you can consume it using AMD, CommonJS and as simple script (see [examples](#examples))
1616

17-
**As a package:** You should use `dist/json-pollock.min.js` - you should also take care to link `dist/json-pollock.min.css` to your web page by yourself.
17+
`json-pollock.min.js` - use this script if you want to handle the import of the styles by youself, if you ue it you should also take care to link `json-pollock.min.css` to your web page. also supports umd.
1818

19-
In order to consume it do one of the following:
19+
`json-pollock.global.min.js` - this script is the same as `json-pollock.min.js`, however is does not support umd - it only puts JsonPollock on the current `this` (usually the `window` object). use this in case you inject the package into sites that not managed by you and you dont know if it use AMD or not.
2020

21-
A script tag:
21+
#####**examples**
2222

23-
<script src="path-to-node-modules/dist/json-pollock.[bundle.]min.js"></script>
23+
A `script` tag:
24+
25+
<script src="path-to-node-modules/dist/json-pollock.[(bundle|global).]min.js"></script>
26+
27+
Following example are relevant only for `json-pollock.bundle.min.js` and `json-pollock.min.js`:
2428

2529
Using [RequireJS](http://requirejs.org/):
2630

Diff for: dist/json-pollock.bundle.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/json-pollock.global.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: dist/json-pollock.global.min.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)