Skip to content

Commit

Permalink
Upgrade to babel 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
goatslacker committed Feb 15, 2015
1 parent 1f73a3a commit b7dd779
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
26 changes: 13 additions & 13 deletions dist/alt-with-runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var getInternalMethods = function (obj, excluded) {
var AltStore = (function () {
function AltStore(dispatcher, state) {
var _this5 = this;
to5Runtime.classCallCheck(this, AltStore);
babelHelpers.classCallCheck(this, AltStore);

this[EE] = new EventEmitter();
this[LIFECYCLE] = {};
Expand All @@ -67,7 +67,7 @@ var AltStore = (function () {
}
}

to5Runtime.prototypeProperties(AltStore, null, {
babelHelpers.prototypeProperties(AltStore, null, {
emitChange: {
value: function emitChange() {
this[EE].emit("change", this[STATE_CONTAINER]);
Expand Down Expand Up @@ -104,15 +104,15 @@ var AltStore = (function () {

var ActionCreator = (function () {
function ActionCreator(alt, name, action, actions) {
to5Runtime.classCallCheck(this, ActionCreator);
babelHelpers.classCallCheck(this, ActionCreator);

this[ACTION_UID] = name;
this[ACTION_HANDLER] = action.bind(this);
this.actions = actions;
this.alt = alt;
}

to5Runtime.prototypeProperties(ActionCreator, null, {
babelHelpers.prototypeProperties(ActionCreator, null, {
dispatch: {
value: function dispatch(data) {
this.alt.dispatch(this[ACTION_UID], data);
Expand Down Expand Up @@ -225,7 +225,7 @@ var filterSnapshotOfStores = function (snapshot, storeNames) {

var Alt = (function () {
function Alt() {
to5Runtime.classCallCheck(this, Alt);
babelHelpers.classCallCheck(this, Alt);

this.dispatcher = new Dispatcher();
this.actions = {};
Expand All @@ -234,7 +234,7 @@ var Alt = (function () {
this[INIT_SNAPSHOT] = "{}";
}

to5Runtime.prototypeProperties(Alt, null, {
babelHelpers.prototypeProperties(Alt, null, {
dispatch: {
value: function dispatch(action, data) {
this.dispatcher.dispatch({ action: action, data: data });
Expand All @@ -251,14 +251,14 @@ var Alt = (function () {
// so we can inherit any extensions from the provided store.
var Store = (function (StoreModel) {
function Store() {
to5Runtime.classCallCheck(this, Store);
babelHelpers.classCallCheck(this, Store);

this[LIFECYCLE] = {};
this[LISTENERS] = {};
to5Runtime.get(Object.getPrototypeOf(Store.prototype), "constructor", this).call(this);
babelHelpers.get(Object.getPrototypeOf(Store.prototype), "constructor", this).call(this);
}

to5Runtime.inherits(Store, StoreModel);
babelHelpers.inherits(Store, StoreModel);

return Store;
})(StoreModel);
Expand Down Expand Up @@ -296,14 +296,14 @@ var Alt = (function () {

var ActionsGenerator = (function (ActionsClass) {
function ActionsGenerator() {
to5Runtime.classCallCheck(this, ActionsGenerator);
babelHelpers.classCallCheck(this, ActionsGenerator);

to5Runtime.get(Object.getPrototypeOf(ActionsGenerator.prototype), "constructor", this).call(this);
babelHelpers.get(Object.getPrototypeOf(ActionsGenerator.prototype), "constructor", this).call(this);
}

to5Runtime.inherits(ActionsGenerator, ActionsClass);
babelHelpers.inherits(ActionsGenerator, ActionsClass);

to5Runtime.prototypeProperties(ActionsGenerator, null, {
babelHelpers.prototypeProperties(ActionsGenerator, null, {
generateActions: {
value: function generateActions() {
for (var _len = arguments.length, actionNames = Array(_len), _key = 0; _key < _len; _key++) {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"object-assign": "^2.0.0"
},
"devDependencies": {
"6to5": "^3.5.3",
"babel": "^4.0.1",
"coveralls": "^2.11.2",
"istanbul": "^0.3.5",
"mocha": "^2.1.0"
Expand All @@ -21,9 +21,9 @@
},
"scripts": {
"build": "npm run build-alt; npm run build-alt-runtime",
"build-alt": "6to5 ./src/alt.js > dist/alt.js",
"build-alt-runtime": "6to5 --runtime src/alt.js > dist/alt-with-runtime.js",
"build-test": "6to5 --runtime test/index.js > test/compiled.js",
"build-alt": "babel ./src/alt.js > dist/alt.js",
"build-alt-runtime": "babel --external-helpers src/alt.js > dist/alt-with-runtime.js",
"build-test": "babel --external-helpers test/index.js > test/compiled.js",
"coverage": "istanbul cover _mocha -- -u exports -R list test/compiled.js",
"prepublish": "npm test",
"test": "npm run build; npm run build-test; npm run tests-all",
Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require('6to5/runtime')
require('babel/external-helpers')

let Alt = require('../dist/alt-with-runtime')
let assert = require('assert')
Expand Down

0 comments on commit b7dd779

Please sign in to comment.