diff --git a/index.html b/index.html index 5dba1f5..dbd1380 100644 --- a/index.html +++ b/index.html @@ -88,8 +88,33 @@
- Run npm install spin.js
(recommended), or save the spin.js file in your repo.
+ Run npm install spin.js
, or save the spin.js and spin.css files in your repository.
+ For best performance and compatibility, it is recommended to use a module bundler such as + Parcel, Rollup, + or Webpack to create a production-ready code bundle. + However, in modern browsers it is also possible to directly load the module via a script tag: +
++ <script type="module" src="node_modules/spin.js/spin.js"></script> ++
+ If for some reason you can't use ES6 modules or a module bundler, download + spin.umd.js and save it in your repository. + The UMD script can be used as follows: +
++ var spinner = new Spin.Spinner(opts).spin(target); ++
+ Note that the UMD version is only available as a temporary workaround. + Longer term it is recommended to migrate to the standard ES6 module. +
+ +Load the spin.css file to include the default animation presets. You could alternatively create a custom CSS keyframe animation (in your own CSS file) @@ -136,17 +161,6 @@
- Not all browsers support native ES6 module imports yet, so it is recommended to use a module bundler such as - Webpack or - Rollup to create a production-ready code bundle. -
-- If for some reason you can't use ES6 modules or a module bundler, download - spin.umd.js and save it in your repo. -
-
In order to manually insert the spinner into the DOM you can invoke the spin()
method