Skip to content

Commit

Permalink
update some packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandra committed Dec 31, 2018
1 parent 6e56a0a commit b1ccf4f
Show file tree
Hide file tree
Showing 4 changed files with 1,787 additions and 3,414 deletions.
4 changes: 2 additions & 2 deletions examples/src/standalone.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ <h2 class="header">Standalone UMD Build</h2>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.6.0/react.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.6.0/react-dom.min.js"></script>
<script src="https://unpkg.com/[email protected]/prop-types.js"></script>
<script src="https://unpkg.com/react-photo-gallery@6.0.29/dist/react-photo-gallery.min.js"></script>
<script src="https://unpkg.com/react-photo-gallery@6.3.0/dist/react-photo-gallery.umd.js"></script>
<!--
<script src="react-photo-gallery.min.js"></script>
<script src="react-photo-gallery.umd.js"></script>
-->
<script type="text/babel">
const photos = [
Expand Down
26 changes: 11 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"url": "https://github.com/neptunian/react-photo-gallery/issues"
},
"dependencies": {
"fsevents": "^1.2.4",
"prop-types": "~15.6.1",
"prop-types": "~15.6.2",
"resize-observer-polyfill": "^1.5.0"
},
"devDependencies": {
Expand All @@ -26,36 +25,33 @@
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"babel-eslint": "^9.0.0",
"babel-jest": "^23.4.2",
"babel-jest": "^23.6.0",
"babel-loader": "^8.0.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.13",
"coveralls": "^3.0.0",
"cross-env": "^5.0.5",
"enzyme": "^3.2.0",
"enzyme": "^3.8.0",
"enzyme-adapter-react-16": "^1.1.0",
"enzyme-to-json": "^3.3.4",
"eslint": "^4.5.0",
"eslint-config-prettier": "^2.3.0",
"eslint-plugin-prettier": "^2.2.0",
"eslint-plugin-react": "^7.3.0",
"jest": "^21.2.1",
"jest-cli": "^21.2.1",
"jest": "24.0.0-alpha.9",
"jest-cli": "24.0.0-alpha.9",
"jsonp": "^0.2.1",
"nps": "^5.7.1",
"nps-utils": "^1.4.0",
"prettier": "^1.6.1",
"react": "16.6.3",
"react-dom": "16.6.3",
"react": "16.7.0",
"react-dom": "16.7.0",
"react-images": "^0.5.18",
"react-test-renderer": "^16.1.1",
"rollup": "^0.50.0",
"rollup": "^1.0.0",
"rollup-plugin-babel": "^4.0.1",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-uglify": "^2.0.1",
"uglify-es": "^3.1.3",
"webpack": "^4.8.3",
"webpack-cli": "^2.1.4",
"webpack-dev-server": "^3.1.4"
"webpack": "^4.28.3",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.14"
},
"peerDependencies": {
"react": "^16.0.0",
Expand Down
24 changes: 4 additions & 20 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import babel from 'rollup-plugin-babel';
import resolve from 'rollup-plugin-node-resolve';
import uglify from 'rollup-plugin-uglify';
import { minify } from 'uglify-es';

const name = 'Gallery';
const path = 'dist/react-photo-gallery';
Expand All @@ -12,7 +10,7 @@ const globals = {
'resize-observer-polyfill': 'ResizeObserver'
};
const external = Object.keys(globals);
const babelOptions = (production) => {
const babelOptions = () => {
let result = {
babelrc: false,
presets: [['@babel/preset-env', { modules: false }], '@babel/preset-react'],
Expand All @@ -21,9 +19,6 @@ const babelOptions = (production) => {
'@babel/plugin-proposal-object-rest-spread',
],
};
if (production) {
result.plugins.push('transform-react-remove-prop-types');
};
return result;
};

Expand All @@ -35,28 +30,17 @@ export default [
format: 'es',
},
external: external,
plugins: [babel(babelOptions(false))],
plugins: [babel(babelOptions())],
},
{
input: 'src/Gallery.js',
output: {
name: name,
file: path + '.umd.js',
format: 'umd',
globals: globals,
},
globals: globals,
external: external,
plugins: [babel(babelOptions(false)), resolve()],
},
{
input: 'src/Gallery.js',
output: {
name: name,
file: path + '.umd.min.js',
format: 'umd',
},
globals: globals,
external: external,
plugins: [babel(babelOptions(true)), resolve(), uglify({}, minify)],
plugins: [babel(babelOptions()), resolve()],
},
];
Loading

0 comments on commit b1ccf4f

Please sign in to comment.