Skip to content

Commit

Permalink
export a babel-compiled commonjs module
Browse files Browse the repository at this point in the history
  • Loading branch information
pryley committed Feb 3, 2021
1 parent 65fa9b5 commit 98ab237
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 6 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ All changes should be committed to the files in `src/`.

## Changelog

`v4.0.4 - [2021-02-02]`

- Export a babel-transpiled commonjs module

`v4.0.3 - [2021-01-29]`

- Fixed rollup config to support optional-chaining in babel
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ <h2>License</h2>

<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/prism.min.js" integrity="sha512-YBk7HhgDZvBxmtOfUdvX0z8IH2d10Hp3aEygaMNhtF8fSOvBZ16D/1bXZTJV6ndk/L/DlXxYStP8jrF77v2MIg==" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/plugins/autoloader/prism-autoloader.min.js" integrity="sha512-zc7WDnCM3aom2EziyDIRAtQg1mVXLdILE09Bo+aE1xk0AM2c2cVLfSW9NrxE5tKTX44WBY0Z2HClZ05ur9vB6A==" crossorigin="anonymous"></script>
<script src="dist/star-rating.js?ver=4.0.3"></script>
<script src="dist/star-rating.js?ver=4.0.4"></script>
<script>
var destroyed = false;
var svg = {
Expand Down
1 change: 1 addition & 0 deletions index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "star-rating.js",
"description": "This zero-dependency ES6 module transforms a SELECT into a dynamic star rating element.",
"version": "4.0.3",
"version": "4.0.4",
"author": {
"name": "Paul Ryley",
"email": "[email protected]",
Expand Down Expand Up @@ -41,8 +41,7 @@
"build": "NODE_ENV=production rollup -c",
"watch": "rollup -cw"
},
"main": "src/index.js",
"module": "src/index.js",
"main": "index.js",
"style": "src/index.css",
"dependencies": {
"detect-it": "^4.0.0"
Expand Down
20 changes: 20 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ import { terser } from "rollup-plugin-terser";
const production = process.env.NODE_ENV === 'production';

export default [
{
input: 'src/index.js',
output: {
file: 'index.js',
format: 'cjs',
},
plugins: [
resolve(),
filesize(),
babel({
babelHelpers: 'bundled',
presets: [
['@babel/preset-env', {
include: ['@babel/plugin-proposal-optional-chaining'],
}],
],
}),
terser(),
]
},
{
input: 'src/index.js',
output: {
Expand Down
2 changes: 1 addition & 1 deletion src/index.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Star Rating
* @version: 4.0.3
* @version: 4.0.4
* @author: Paul Ryley (http://geminilabs.io)
* @url: https://github.com/pryley/star-rating.js
* @license: MIT
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**!
* Star Rating
* @version: 4.0.3
* @version: 4.0.4
* @author: Paul Ryley (http://geminilabs.io)
* @url: https://github.com/pryley/star-rating.js
* @license: MIT
Expand Down

0 comments on commit 98ab237

Please sign in to comment.