Skip to content

Commit

Permalink
Link to spin.umd.js as alternative for those who can't use ES6 modules
Browse files Browse the repository at this point in the history
Closes #367.

The UMD file is not included in the npm package since it's unnecessary for anyone using a module bundler.
  • Loading branch information
theodorejb committed Feb 10, 2019
1 parent 3bcde6c commit f411ab9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/.grunt
/node_modules
/package-lock.json
/site/bundle.js
/site/spin.css
/site/spin.js
/site/spin.umd.js
/spin.js
/spin.d.ts
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
},
"devDependencies": {
"grunt": "^1.0.3",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-connect": "^2.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-gh-pages": "^2.0.0",
"rollup": "^0.65.0",
"typescript": "^3.0.3"
"grunt-gh-pages": "^3.1.0",
"rollup": "^1.1.2",
"typescript": "^3.3.3"
},
"dependencies": {}
}
8 changes: 8 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
export default [
{
input: 'spin.js',
output: {
file: 'site/spin.umd.js',
format: 'umd',
name: 'Spin',
},
},
{
input: 'site/index.js',
output: {
Expand Down
4 changes: 4 additions & 0 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ <h3>Bundling</h3>
<a href="https://webpack.js.org/">Webpack</a> or
<a href="https://rollupjs.org/">Rollup</a> to create a production-ready code bundle.
</p>
<p>
If for some reason you can't use ES6 modules or a module bundler, download
<a href="spin.umd.js">spin.umd.js</a> and save it in your repo.
</p>

<h3>Manual insertion</h3>
<p>
Expand Down

0 comments on commit f411ab9

Please sign in to comment.