Skip to content

Commit

Permalink
fix(lory.js): remove lory as the default function in order to get bab…
Browse files Browse the repository at this point in the history
…el 6 running
  • Loading branch information
meandmax committed Nov 4, 2015
1 parent a0ec5f9 commit 95aa9d4
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 25 deletions.
10 changes: 5 additions & 5 deletions demo/js/jquery.lory.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["lory"] = factory();
else
root["lory"] = factory();
else {
var a = factory();
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
Expand Down Expand Up @@ -84,7 +84,7 @@ return /******/ (function(modules) { // webpackBootstrap
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = lory;
exports.lory = lory;

var _detectPrefixes = __webpack_require__(2);

Expand Down
2 changes: 1 addition & 1 deletion demo/js/jquery.lory.min.js

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

10 changes: 5 additions & 5 deletions demo/js/lory.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["lory"] = factory();
else
root["lory"] = factory();
else {
var a = factory();
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
Expand Down Expand Up @@ -68,7 +68,7 @@ return /******/ (function(modules) { // webpackBootstrap
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = lory;
exports.lory = lory;

var _detectPrefixes = __webpack_require__(2);

Expand Down
Loading

1 comment on commit 95aa9d4

@ZauberNerd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default exports are broken in Babel 6 (as is almost everything else they did in this release).
You should not try to adapt to broken behaviour in your toolchain (but instead downgrade to babel 5 until version 6 is usable).
Also: This change is a breaking change and must come with a new major version, because it changes the public API of your module

import lory from 'lory.js';

vs new:

import {lory} from 'lory.js';

Please sign in to comment.