Skip to content

Allow bundler to choose right build #32

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion build/webpack.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ module.exports = {
* },
* },
*/
'autonumeric/dist/autoNumeric.min': 'AutoNumeric',
autonumeric: 'AutoNumeric',
},
};
14 changes: 7 additions & 7 deletions dist/vue-autonumeric.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* vue-autonumeric v1.2.6 (https://github.com/autoNumeric/vue-autoNumeric)
* © 2018 Alexandre Bonneau <[email protected]>
* © 2019 Alexandre Bonneau <[email protected]>
* Released under the MIT License.
*/
(function webpackUniversalModuleDefinition(root, factory) {
Expand Down Expand Up @@ -306,9 +306,9 @@ var _assign = __webpack_require__(16);

var _assign2 = _interopRequireDefault(_assign);

var _autoNumeric = __webpack_require__(43);
var _autonumeric = __webpack_require__(43);

var _autoNumeric2 = _interopRequireDefault(_autoNumeric);
var _autonumeric2 = _interopRequireDefault(_autonumeric);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

Expand Down Expand Up @@ -400,7 +400,7 @@ exports.default = {
this.hasContentEditable = !this.initialOptions.readOnly;
},
mounted: function mounted() {
this.anElement = new _autoNumeric2.default(this.$refs.autoNumericElement, this.initialOptions);
this.anElement = new _autonumeric2.default(this.$refs.autoNumericElement, this.initialOptions);
if (this.value !== null && this.value !== '') {
this.anElement.set(this.value);

Expand All @@ -427,7 +427,7 @@ exports.default = {
manageOptionElement: function manageOptionElement(optionElement) {
var options = void 0;
if (typeof optionElement === 'string' || optionElement instanceof String) {
options = _autoNumeric2.default.getPredefinedOptions()[optionElement];
options = _autonumeric2.default.getPredefinedOptions()[optionElement];
if (options === void 0 || options === null) {
console.warn('The given pre-defined options [' + optionElement + '] is not recognized by AutoNumeric.\nSwitching back to the default options.');
options = defaultOptions;
Expand All @@ -449,9 +449,9 @@ exports.default = {

var optionsToUse = void 0;
if (Array.isArray(newValue.options)) {
optionsToUse = _autoNumeric2.default.mergeOptions(newValue.options);
optionsToUse = _autonumeric2.default.mergeOptions(newValue.options);
} else {
optionsToUse = _autoNumeric2.default._getOptionObject(newValue.options);
optionsToUse = _autonumeric2.default._getOptionObject(newValue.options);
}

this.anElement.update(optionsToUse);
Expand Down
2 changes: 1 addition & 1 deletion src/components/VueAutonumeric.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ OTHER DEALINGS IN THE SOFTWARE.
-->

<script type="text/babel">
import AutoNumeric from 'autonumeric/dist/autoNumeric.min';
import AutoNumeric from 'autonumeric';

// Custom default autoNumeric option can be set here to override the default autoNumeric ones
const defaultOptions = {};
Expand Down