Skip to content

Commit

Permalink
Merge pull request #656 from gpbl/revert-651-fix-umd-again
Browse files Browse the repository at this point in the history
Revert "Fix umd build"
  • Loading branch information
gpbl authored Mar 8, 2018
2 parents ab9febd + 95f64eb commit 5660841
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 21 deletions.
3 changes: 2 additions & 1 deletion DayPicker.dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/* eslint-disable no-var */
/* eslint-env node */

var DayPicker = require('./src').default;
var DayPicker = require('./src/DayPicker').default;
DayPicker.Input = require('./src/DayPickerInput').default;

module.exports = DayPicker;
8 changes: 7 additions & 1 deletion DayPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@
/* eslint-disable no-var */
/* eslint-env node */

var DayPicker = require('./lib/src');
var DayPicker = require('./lib/src/DayPicker');
var DateUtils = require('./lib/src/DateUtils');
var LocaleUtils = require('./lib/src/LocaleUtils');
var ModifiersUtils = require('./lib/src/ModifiersUtils');
var Weekday = require('./lib/src/Weekday');
var Navbar = require('./lib/src/Navbar');
var PropTypes = require('./lib/src/PropTypes');

module.exports = DayPicker;
module.exports.DateUtils = DateUtils;
module.exports.LocaleUtils = LocaleUtils;
module.exports.ModifiersUtils = ModifiersUtils;
module.exports.WeekdayPropTypes = Weekday.propTypes;
module.exports.NavbarPropTypes = Navbar.propTypes;
module.exports.PropTypes = PropTypes;
4 changes: 4 additions & 0 deletions src/DayPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,3 +574,7 @@ export default class DayPicker extends Component {
);
}
}

DayPicker.DateUtils = DateUtils;
DayPicker.LocaleUtils = LocaleUtils;
DayPicker.ModifiersUtils = ModifiersUtils;
16 changes: 4 additions & 12 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import DayPicker from './DayPicker';
import Input from './DayPickerInput';
import * as DateUtils from './DateUtils';
import * as LocaleUtils from './LocaleUtils';
import * as ModifiersUtils from './ModifiersUtils';

DayPicker.Input = Input;
DayPicker.DateUtils = DateUtils;
DayPicker.LocaleUtils = LocaleUtils;
DayPicker.ModifiersUtils = ModifiersUtils;

export { DayPicker as default, DateUtils, LocaleUtils, ModifiersUtils };
export default from './DayPicker';
export DateUtils from './DateUtils';
export LocaleUtils from './LocaleUtils';
export ModifiersUtils from './ModifiersUtils';
7 changes: 0 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/* eslint global-require: 0, import/no-extraneous-dependencies: 0 */
/* eslint-env node */

const webpack = require('webpack');

const isProduction = process.env.NODE_ENV === 'production';

module.exports = {
Expand Down Expand Up @@ -31,11 +29,6 @@ module.exports = {
},
],
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
})
],
externals: {
react: {
root: 'React',
Expand Down

0 comments on commit 5660841

Please sign in to comment.