Converted all modules from CommonJS to ES6

This commit is contained in:
n1474335 2017-03-23 17:52:20 +00:00
parent 0f2a5014be
commit 131b3a83c1
75 changed files with 395 additions and 282 deletions

View file

@ -1,5 +1,5 @@
var Operation = require("./Operation.js");
// OperationConfig required at the bottom of this file to prevent circular dependency errors
import Operation from "./Operation.js";
import OperationConfig from "./config/OperationConfig.js";
/**
@ -12,7 +12,7 @@ var Operation = require("./Operation.js");
* @class
* @param {Object} recipeConfig
*/
var Recipe = module.exports = function(recipeConfig) {
var Recipe = function(recipeConfig) {
this.opList = [];
if (recipeConfig) {
@ -217,7 +217,4 @@ Recipe.prototype.fromString = function(recipeStr) {
this._parseConfig(recipeConfig);
};
// Required here to prevent circular dependency where Recipe returns an empty object
// See http://stackoverflow.com/a/30390378
var OperationConfig = require("./config/OperationConfig.js");
export default Recipe;