Skip to content

Commit 6e3d80d

Browse files
authored
change umd library name and add CDN to readme (#170)
* change lib name * package version * update readme
1 parent 9a3f14f commit 6e3d80d

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,24 @@ My intention was to create something that looks like this https://github.com/mde
99
Here you can find a live example https://arfedulov.github.io/semantic-ui-calendar-react
1010

1111
# installation
12+
13+
## npm
1214
```
1315
npm i semantic-ui-calendar-react
1416
```
1517

18+
## CDN
19+
20+
```html
21+
<script src="https://cdn.jsdelivr.net/npm/semantic-ui-calendar-react@latest/dist/umd/semantic-ui-calendar-react.js"></script>
22+
```
23+
24+
Then you can access calendar components from your scripts like this:
25+
26+
```js
27+
const { DateInput } = SemanticUiCalendarReact;
28+
```
29+
1630
# usage
1731
Let's create a form that needs date-related input fields.
1832

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "semantic-ui-calendar-react",
33
"sideEffects": false,
4-
"version": "0.15.1",
4+
"version": "0.15.2",
55
"description": "date/time picker built from semantic-ui elements",
66
"main": "dist/commonjs/index.js",
77
"scripts": {

webpack.umd.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const config = {
66
},
77
output: {
88
path: path.resolve(__dirname, 'dist', 'umd'),
9-
library: 'semantic-ui-calendar-react',
9+
library: 'SemanticUiCalendarReact',
1010
libraryTarget: 'umd',
1111
filename: 'semantic-ui-calendar-react.js',
1212
},

0 commit comments

Comments
 (0)