bootstrap5-toggle 5.0.0-alpha → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased](https://github.com/palcarazm/bootstrap5-toggle/tree/v5)
9
9
 
10
- ### [Full Changelog](https://github.com/palcarazm/bootstrap5-toggle/compare/v4.3.6...v5)
10
+ ### [Full Changelog](https://github.com/palcarazm/bootstrap5-toggle/compare/v5.0.0...v5)
11
11
  ### Added
12
12
 
13
13
  ### Changed
@@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
15
  ### Fixed
16
16
 
17
17
  ### Bump
18
+
19
+ ## [5.0.0](https://github.com/palcarazm/bootstrap5-toggle/tree/v5.0.0) 2023-01-10
20
+
21
+ ### [Full Changelog](https://github.com/palcarazm/bootstrap5-toggle/compare/v4.3.6...v5.0.0)
18
22
  ## [5.0.0-alpha](https://github.com/palcarazm/bootstrap5-toggle/tree/v5.0.0-alpha) 2023-01-01
19
23
 
20
24
  ### [Full Changelog](https://github.com/palcarazm/bootstrap5-toggle/compare/v4.3.6...v5.0.0-alpha)
@@ -0,0 +1,293 @@
1
+ [![GitHub license](https://img.shields.io/github/license/palcarazm/bootstrap5-toggle.svg?color=informational)](https://github.com/palcarazm/bootstrap5-toggle/blob/master/LICENSE)
2
+ [![Latest release](https://img.shields.io/github/package-json/v/palcarazm/bootstrap5-toggle/v5?logo=github)](https://github.com/palcarazm/bootstrap5-toggle/releases)
3
+ [![Bootstrap 5](https://img.shields.io/static/v1?label=bootstrap&message=%5E5.0.0&color=informational&logo=bootstrap&logoColor=white)](https://getbootstrap.com/docs/5.0)
4
+ [![JSDelivr Badge](https://img.shields.io/jsdelivr/npm/hm/bootstrap5-toggle?label=hits&logo=jsdelivr&logoColor=white)](https://www.jsdelivr.com/package/npm/bootstrap5-toggle)
5
+ [![NPM Badge](https://img.shields.io/npm/dm/bootstrap5-toggle?logo=npm)](https://www.npmjs.com/package/bootstrap5-toggle)
6
+ [![Build](https://img.shields.io/github/actions/workflow/status/palcarazm/bootstrap5-toggle/build.yml?branch=v5&logo=npm)](https://github.com/palcarazm/bootstrap5-toggle/actions?query=workflow%3A%22Build+Check%22)
7
+ [![Test](https://img.shields.io/github/actions/workflow/status/palcarazm/bootstrap5-toggle/cypress.yml?branch=v5&label=tests&logo=cypress)](https://github.com/palcarazm/bootstrap5-toggle/actions?query=workflow%3A%22Cypress+Tests%22)
8
+ [![Security](https://img.shields.io/snyk/vulnerabilities/npm/bootstrap5-toggle@#version#?logo=snyk)](https://snyk.io/advisor/npm-package/bootstrap5-toggle)
9
+ [![EOL](https://img.shields.io/endpoint?url=https%3A%2F%2Fpalcarazm.github.io%2Fbootstrap5-toggle%2Fapi%2Feol%2Fv5)](https://github.com/palcarazm/bootstrap5-toggle/security/policy)
10
+ [![Funding](https://img.shields.io/badge/sponsor-30363D?style=flat&logo=GitHub-Sponsors&logoColor=#white)](https://github.com/sponsors/palcarazm)
11
+ [![Rate this package](https://badges.openbase.com/js/rating/bootstrap5-toggle.svg?token=rNvznTVToo+EmX5g+KTvfYqI9+YTWJeUWTxPj7tLA6o=)](https://openbase.com/js/bootstrap5-toggle?utm_source=embedded&utm_medium=badge&utm_campaign=rating-badge&utm_term=js/bootstrap5-toggle)
12
+
13
+ # Bootstrap 5 Toggle
14
+
15
+ **Bootstrap 5 Toggle** is a bootstrap plugin/widget that converts checkboxes into toggles.
16
+
17
+ ---
18
+
19
+ #### Library Distributions
20
+
21
+ | Branch | Bootstrap Support | Last Release |
22
+ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
23
+ | [bootstrap5-toggle v5](https://github.com/palcarazm/bootstrap5-toggle/tree/v5) | [![Bootstrap 5](https://img.shields.io/static/v1?label=bootstrap&message=%5E5.0.0&color=informational&logo=bootstrap&logoColor=white)](https://getbootstrap.com/docs/5.0) | [![Latest release](https://img.shields.io/github/package-json/v/palcarazm/bootstrap5-toggle/v5?logo=github)](https://github.com/palcarazm/bootstrap5-toggle/releases) |
24
+ | [bootstrap5-toggle v4](https://github.com/palcarazm/bootstrap5-toggle/tree/v4) | [![Bootstrap 5](https://img.shields.io/static/v1?label=bootstrap&message=%5E5.0.0&color=informational&logo=bootstrap&logoColor=white)](https://getbootstrap.com/docs/5.0) | [![Latest release](https://img.shields.io/github/package-json/v/palcarazm/bootstrap5-toggle/v4?logo=github)](https://github.com/palcarazm/bootstrap5-toggle/releases) |
25
+ | [bootstrap5-toggle v3](https://github.com/palcarazm/bootstrap5-toggle/tree/v3) | [![Bootstrap 4](https://img.shields.io/static/v1?label=bootstrap&message=%5E4.0.0&color=informational&logo=bootstrap&logoColor=white)](https://getbootstrap.com/docs/4.0) | [![Latest release](https://img.shields.io/github/package-json/v/palcarazm/bootstrap5-toggle/v3?logo=github)](https://github.com/palcarazm/bootstrap5-toggle/releases) |
26
+
27
+ See EOL for each version in [Security Policy Page](https://github.com/palcarazm/bootstrap5-toggle/security/policy).
28
+ # Demos
29
+
30
+ **Demos and API Docs:** https://palcarazm.github.io/bootstrap5-toggle/
31
+
32
+ ![Demo GIF](img/bootstrap5-toggle-demo.gif)
33
+
34
+ # Related Bootstrap Plugins
35
+
36
+ <div align="center">
37
+ <a href="https://github.com/palcarazm/bs-darkmode" title="Boostrap Darkmode"
38
+ ><img
39
+ src="https://github-readme-stats.vercel.app/api/pin/?username=palcarazm&repo=bs-darkmode&border_radius=10&show_owner=true"
40
+ /></a>
41
+ </div>
42
+
43
+ ---
44
+
45
+ <!-- To update TOC run .\node_modules\.bin\doctoc README.md --github -->
46
+ <!-- START doctoc generated TOC please keep comment here to allow auto update -->
47
+ <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
48
+
49
+ - [Bootstrap 5 Toggle](#bootstrap-5-toggle)
50
+ - [Library Distributions](#library-distributions)
51
+ - [Demos](#demos)
52
+ - [Related Bootstrap Plugins](#related-bootstrap-plugins)
53
+ - [Installation](#installation)
54
+ - [CDN](#cdn)
55
+ - [ECMAS Interface](#ecmas-interface)
56
+ - [jQuery Interface](#jquery-interface)
57
+ - [Download](#download)
58
+ - [NPM](#npm)
59
+ - [Yarn](#yarn)
60
+ - [Usage](#usage)
61
+ - [Initialize With HTML](#initialize-with-html)
62
+ - [Initialize With Code](#initialize-with-code)
63
+ - [API](#api)
64
+ - [Options](#options)
65
+ - [Methods](#methods)
66
+ - [Events](#events)
67
+ - [Event Propagation](#event-propagation)
68
+ - [Stopping Event Propagation](#stopping-event-propagation)
69
+ - [API vs Input](#api-vs-input)
70
+ - [Collaborators welcom!](#collaborators-welcom)
71
+
72
+ <!-- END doctoc generated TOC please keep comment here to allow auto update -->
73
+
74
+ ---
75
+
76
+ # Installation
77
+
78
+ ## CDN
79
+
80
+ [![JSDelivr Badge](https://img.shields.io/jsdelivr/npm/hm/bootstrap5-toggle?label=hits&logo=jsdelivr&logoColor=white)](https://www.jsdelivr.com/package/npm/bootstrap5-toggle)
81
+
82
+ ### ECMAS Interface
83
+
84
+ ```html
85
+ <link
86
+ href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@#version#/css/bootstrap5-toggle.min.css"
87
+ rel="stylesheet" />
88
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@#version#/js/bootstrap5-toggle.ecmas.min.js"></script>
89
+ ```
90
+
91
+ ### jQuery Interface
92
+
93
+ ```html
94
+ <link
95
+ href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@#version#/css/bootstrap5-toggle.min.css"
96
+ rel="stylesheet" />
97
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@#version#/js/bootstrap5-toggle.jquery.min.js"></script>
98
+ ```
99
+
100
+ ## Download
101
+
102
+ [![Latest release](https://img.shields.io/github/package-json/v/palcarazm/bootstrap5-toggle/v5?logo=github)](https://github.com/palcarazm/bootstrap5-toggle/releases)
103
+
104
+ ## NPM
105
+
106
+ [![NPM Badge](https://img.shields.io/npm/dm/bootstrap5-toggle?logo=npm)](https://www.npmjs.com/package/bootstrap5-toggle)
107
+
108
+ ```ksh
109
+ npm install bootstrap5-toggle@#version#
110
+ ```
111
+
112
+ ## Yarn
113
+
114
+ ```ksh
115
+ yarn add bootstrap5-toggle@#version#
116
+ ```
117
+
118
+ # Usage
119
+
120
+ ## Initialize With HTML
121
+
122
+ Simply add `data-toggle="toggle"` to automatically convert a plain checkbox into a bootstrap 5 toggle.
123
+
124
+ ```html
125
+ <input id="chkToggle" type="checkbox" data-toggle="toggle" />
126
+ ```
127
+
128
+ ## Initialize With Code
129
+
130
+ Toggles can also be initialized via JavaScript code.
131
+
132
+ EX: Initialize id `chkToggle` with a single line of JavaScript.
133
+
134
+ ```html
135
+ <input id="chkToggle" type="checkbox" checked />
136
+ <script>
137
+ document.querySelector("#chkToggle").bootstrapToggle();
138
+ </script>
139
+ ```
140
+
141
+ # API
142
+
143
+ ## Options
144
+
145
+ - Options can be passed via data attributes or JavaScript
146
+ - For data attributes, append the option name to `data-` (ex: `data-on="Enabled"`)
147
+
148
+ ```html
149
+ <input
150
+ type="checkbox"
151
+ data-toggle="toggle"
152
+ data-onlabel="Enabled"
153
+ data-offlabel="Disabled" />
154
+ <input type="checkbox" id="toggle-two" />
155
+ <script>
156
+ document.querySelector("#toggle-two").bootstrapToggle({
157
+ on: "Enabled",
158
+ off: "Disabled",
159
+ });
160
+ </script>
161
+ ```
162
+
163
+ | Name | Type | Default | Description |
164
+ | ---------- | ----------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
165
+ | `onlabel` | string/html | "On" | Text of the on toggle |
166
+ | `offlabel` | string/html | "Off" | Text of the off toggle |
167
+ | `size` | string | "normal" | Size of the toggle. Possible values are: `large`, `normal`, `small`, `mini`. |
168
+ | `onstyle` | string | "primary" | Style of the on toggle. Possible values are: `primary`, `secondary`, `success`, `danger`, `warning`, `info`, `light`, `dark` and with `outline-` prefix |
169
+ | `offstyle` | string | "secondary" | Style of the off toggle. Possible values are: `primary`, `secondary`, `success`, `danger`, `warning`, `info`, `light`, `dark` and with `outline-` prefix |
170
+ | `onvalue` | string | _null_ | Sets on state value |
171
+ | `offvalue` | string | _null_ | Sets off state value |
172
+ | `ontitle` | string | _null_ | Title of the on toggle |
173
+ | `offtitle` | string | _null_ | Title of the off toggle |
174
+ | `style` | string | | Appends the value to the class attribute of the toggle. This can be used to apply custom styles. Refer to Custom Styles for reference. |
175
+ | `width` | integer | _null_ | Sets the width of the toggle. if set to _null_, width will be auto-calculated. |
176
+ | `height` | integer | _null_ | Sets the height of the toggle. if set to _null_, height will be auto-calculated. |
177
+ | `tabindex` | integer | 0 | Sets the tabindex of the toggle. |
178
+ | `tristate` | boolean | false | Sets tristate support |
179
+
180
+ ## Methods
181
+
182
+ Methods can be used to control toggles directly.
183
+
184
+ ```html
185
+ <input id="toggle-demo" type="checkbox" data-toggle="toggle" />
186
+ <script>
187
+ const toggleDemo = document.querySelector("#toggle-demo");
188
+ </script>
189
+ ```
190
+
191
+ | Method | Example | Description |
192
+ | ------------- | --------------------------------------------- | ------------------------------------------------- |
193
+ | initialize | `toggleDemo.bootstrapToggle()` | Initializes the toggle plugin with options |
194
+ | destroy | `toggleDemo.bootstrapToggle('destroy')` | Destroys the toggle |
195
+ | on | `toggleDemo.bootstrapToggle('on')` | Sets the toggle to 'On' state |
196
+ | off | `toggleDemo.bootstrapToggle('off')` | Sets the toggle to 'Off' state |
197
+ | toggle | `toggleDemo.bootstrapToggle('toggle')` | Toggles the state of the toggle on/off |
198
+ | enable | `toggleDemo.bootstrapToggle('enable')` | Enables the toggle |
199
+ | disable | `toggleDemo.bootstrapToggle('disable')` | Disables the toggle |
200
+ | readonly | `toggleDemo.bootstrapToggle('readonly')` | Disables the toggle but preserve checkbox enabled |
201
+ | indeterminate | `toggleDemo.bootstrapToggle('indeterminate')` | Sets the toggle to 'indeterminate' state |
202
+ | determinate | `toggleDemo.bootstrapToggle('determinate')` | Sets the toggle to 'determinate' state |
203
+
204
+ # Events
205
+
206
+ ## Event Propagation
207
+
208
+ Note All events are propagated to and from input element to the toggle.
209
+
210
+ You should listen to events from the `<input type="checkbox">` directly rather than look for custom events.
211
+
212
+ ```html
213
+ <input id="toggle-event" type="checkbox" data-toggle="toggle" />
214
+ <div id="console-event"></div>
215
+ <script>
216
+ document.querySelector("#toggle-event").change(function (e) {
217
+ document
218
+ .querySelector("#console-event")
219
+ .html("Toggle: " + e.target.prop("checked"));
220
+ });
221
+ </script>
222
+ ```
223
+
224
+ ## Stopping Event Propagation
225
+
226
+ Passing `true` to the on, off, toggle, determinate and indeterminate methods will enable the silent option to prevent the control from propagating the change event in cases where you want to update the controls on/off state, but do not want to fire the onChange event.
227
+
228
+ ```html
229
+ <input id="toggle-silent" type="checkbox" data-toggle="toggle" />
230
+ <button class="btn btn-success" onclick="toggleApiOnSilent()">
231
+ On by API (silent)
232
+ </button>
233
+ <button class="btn btn-success" onclick="toggleApiOffSilent()">
234
+ Off by API (silent)
235
+ </button>
236
+ <button class="btn btn-warning" onclick="toggleApiOnNotSilent()">
237
+ On by API (not silent)
238
+ </button>
239
+ <button class="btn btn-warning" onclick="toggleApiOffNotSilent()">
240
+ On by API (not silent)
241
+ </button>
242
+ <script>
243
+ function toggleApiOnSilent() {
244
+ document.querySelector("#toggle-silent").bootstrapToggle("on", true);
245
+ }
246
+ function toggleApiOffSilent() {
247
+ document.querySelector("#toggle-silent").bootstrapToggle("off", true);
248
+ }
249
+ function toggleApiOnNotSilent() {
250
+ document.querySelector("#toggle-silent").bootstrapToggle("on");
251
+ }
252
+ function toggleApiOffNotSilent() {
253
+ document.querySelector("#toggle-silent").bootstrapToggle("off");
254
+ }
255
+ </script>
256
+ ```
257
+
258
+ ## API vs Input
259
+
260
+ This also means that using the API or Input to trigger events will work both ways.
261
+
262
+ ```html
263
+ <input id="toggle-trigger" type="checkbox" data-toggle="toggle" />
264
+ <button class="btn btn-success" onclick="toggleApiOn()">On by API</button>
265
+ <button class="btn btn-danger" onclick="toggleApiOff()">Off by API</button>
266
+ <button class="btn btn-success" onclick="toggleInpOn()">On by Input</button>
267
+ <button class="btn btn-danger" onclick="toggleInpOff()">Off by Input</button>
268
+ <script>
269
+ function toggleApiOn() {
270
+ document.querySelector("#toggle-trigger").bootstrapToggle("on");
271
+ }
272
+ function toggleApiOff() {
273
+ document.querySelector("#toggle-trigger").bootstrapToggle("off");
274
+ }
275
+ function toggleInpOn() {
276
+ document.querySelector("#toggle-trigger").prop("checked", true).change();
277
+ }
278
+ function toggleInpOff() {
279
+ document.querySelector("#toggle-trigger").prop("checked", false).change();
280
+ }
281
+ </script>
282
+ ```
283
+
284
+ # Collaborators welcom!
285
+
286
+ - :sos: ¿Do you need some help? Open a issue in [GitHub help wanted](https://github.com/palcarazm/bootstrap5-toggle/issues/new?assignees=&labels=help+wanted&template=help-wanted.md&title=%5BHELP%5D)
287
+ - :bug: ¿Do you find a bug? Open a issue in [GitHub bug report](https://github.com/palcarazm/bootstrap5-toggle/issues/new?assignees=&labels=bug&template=bug_report.md&title=%5BBUG%5D)
288
+ - :bulb: ¿Do you have a great idea? Open a issue in [GitHub feature request](https://github.com/palcarazm/bootstrap5-toggle/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=%5BFEATURE%5D)
289
+ - :computer: ¿Do you know how to fix a bug? Open a pull request in [GitHub pull repuest](https://github.com/palcarazm/bootstrap5-toggle/compare).
290
+
291
+ [![GitHub Contributors](https://contrib.rocks/image?repo=palcarazm/bootstrap5-toggle)](https://github.com/palcarazm/bootstrap5-toggle/graphs/contributors)
292
+
293
+ ¿Do you like the project? Give us a :star: in [GitHub](https://github.com/palcarazm/bootstrap5-toggle).
package/README.md CHANGED
@@ -5,8 +5,8 @@
5
5
  [![NPM Badge](https://img.shields.io/npm/dm/bootstrap5-toggle?logo=npm)](https://www.npmjs.com/package/bootstrap5-toggle)
6
6
  [![Build](https://img.shields.io/github/actions/workflow/status/palcarazm/bootstrap5-toggle/build.yml?branch=v5&logo=npm)](https://github.com/palcarazm/bootstrap5-toggle/actions?query=workflow%3A%22Build+Check%22)
7
7
  [![Test](https://img.shields.io/github/actions/workflow/status/palcarazm/bootstrap5-toggle/cypress.yml?branch=v5&label=tests&logo=cypress)](https://github.com/palcarazm/bootstrap5-toggle/actions?query=workflow%3A%22Cypress+Tests%22)
8
- [![Security](https://img.shields.io/snyk/vulnerabilities/npm/bootstrap5-toggle@4.3.6?logo=snyk)](https://snyk.io/advisor/npm-package/bootstrap5-toggle)
9
- [![EOL](https://img.shields.io/static/v1?label=EOL&message=active%20support&color=success)](https://github.com/palcarazm/bootstrap5-toggle/security/policy)
8
+ [![Security](https://img.shields.io/snyk/vulnerabilities/npm/bootstrap5-toggle@5.0.0-alpha?logo=snyk)](https://snyk.io/advisor/npm-package/bootstrap5-toggle)
9
+ [![EOL](https://img.shields.io/endpoint?url=https%3A%2F%2Fpalcarazm.github.io%2Fbootstrap5-toggle%2Fapi%2Feol%2Fv5)](https://github.com/palcarazm/bootstrap5-toggle/security/policy)
10
10
  [![Funding](https://img.shields.io/badge/sponsor-30363D?style=flat&logo=GitHub-Sponsors&logoColor=#white)](https://github.com/sponsors/palcarazm)
11
11
  [![Rate this package](https://badges.openbase.com/js/rating/bootstrap5-toggle.svg?token=rNvznTVToo+EmX5g+KTvfYqI9+YTWJeUWTxPj7tLA6o=)](https://openbase.com/js/bootstrap5-toggle?utm_source=embedded&utm_medium=badge&utm_campaign=rating-badge&utm_term=js/bootstrap5-toggle)
12
12
 
@@ -24,6 +24,7 @@
24
24
  | [bootstrap5-toggle v4](https://github.com/palcarazm/bootstrap5-toggle/tree/v4) | [![Bootstrap 5](https://img.shields.io/static/v1?label=bootstrap&message=%5E5.0.0&color=informational&logo=bootstrap&logoColor=white)](https://getbootstrap.com/docs/5.0) | [![Latest release](https://img.shields.io/github/package-json/v/palcarazm/bootstrap5-toggle/v4?logo=github)](https://github.com/palcarazm/bootstrap5-toggle/releases) |
25
25
  | [bootstrap5-toggle v3](https://github.com/palcarazm/bootstrap5-toggle/tree/v3) | [![Bootstrap 4](https://img.shields.io/static/v1?label=bootstrap&message=%5E4.0.0&color=informational&logo=bootstrap&logoColor=white)](https://getbootstrap.com/docs/4.0) | [![Latest release](https://img.shields.io/github/package-json/v/palcarazm/bootstrap5-toggle/v3?logo=github)](https://github.com/palcarazm/bootstrap5-toggle/releases) |
26
26
 
27
+ See EOL for each version in [Security Policy Page](https://github.com/palcarazm/bootstrap5-toggle/security/policy).
27
28
  # Demos
28
29
 
29
30
  **Demos and API Docs:** https://palcarazm.github.io/bootstrap5-toggle/
@@ -82,18 +83,18 @@
82
83
 
83
84
  ```html
84
85
  <link
85
- href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@4.3.6/css/bootstrap5-toggle.min.css"
86
+ href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.0.0-alpha/css/bootstrap5-toggle.min.css"
86
87
  rel="stylesheet" />
87
- <script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@4.3.6/js/bootstrap5-toggle.ecmas.min.js"></script>
88
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.0.0-alpha/js/bootstrap5-toggle.ecmas.min.js"></script>
88
89
  ```
89
90
 
90
91
  ### jQuery Interface
91
92
 
92
93
  ```html
93
94
  <link
94
- href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@4.3.6/css/bootstrap5-toggle.min.css"
95
+ href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.0.0-alpha/css/bootstrap5-toggle.min.css"
95
96
  rel="stylesheet" />
96
- <script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@4.3.6/js/bootstrap5-toggle.jquery.min.js"></script>
97
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.0.0-alpha/js/bootstrap5-toggle.jquery.min.js"></script>
97
98
  ```
98
99
 
99
100
  ## Download
@@ -105,13 +106,13 @@
105
106
  [![NPM Badge](https://img.shields.io/npm/dm/bootstrap5-toggle?logo=npm)](https://www.npmjs.com/package/bootstrap5-toggle)
106
107
 
107
108
  ```ksh
108
- npm install bootstrap5-toggle@4.3.6
109
+ npm install bootstrap5-toggle@5.0.0-alpha
109
110
  ```
110
111
 
111
112
  ## Yarn
112
113
 
113
114
  ```ksh
114
- yarn add bootstrap5-toggle@4.3.6
115
+ yarn add bootstrap5-toggle@5.0.0-alpha
115
116
  ```
116
117
 
117
118
  # Usage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bootstrap5-toggle",
3
- "version": "5.0.0-alpha",
3
+ "version": "5.0.0",
4
4
  "author": {
5
5
  "name": "Pablo Alcaraz Martínez",
6
6
  "url": "https://github.com/palcarazm/"
@@ -18,9 +18,9 @@
18
18
  "js/*"
19
19
  ],
20
20
  "scripts": {
21
- "build": "grunt",
22
- "postversion": "grunt",
23
- "prepublishOnly": "grunt"
21
+ "build": "grunt build",
22
+ "postversion": "grunt build && grunt readme && doctoc README.md --github",
23
+ "test": "cypress run --browser=chrome"
24
24
  },
25
25
  "keywords": [
26
26
  "bootstrap",
@@ -50,6 +50,7 @@
50
50
  "grunt": "^1.5.3",
51
51
  "grunt-banner": "^0.6.0",
52
52
  "grunt-contrib-clean": "^2.0.1",
53
+ "grunt-contrib-copy": "^1.0.0",
53
54
  "grunt-contrib-cssmin": "^4.0.0",
54
55
  "grunt-contrib-uglify": "^5.2.1"
55
56
  },