Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fix umd build" #656

Merged
merged 1 commit into from
Mar 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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