Skip to content

Commit

Permalink
add build, and docks
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeaudry committed Aug 19, 2018
1 parent 79a5b30 commit 9bff634
Show file tree
Hide file tree
Showing 17 changed files with 75 additions and 14 deletions.
19 changes: 19 additions & 0 deletions dist/metamon.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -18619,7 +18619,26 @@ function setFromString(value) {
Object.assign(this, defineProperty({}, value, value));
}

function ErrorFactory() {
var ErrorClass = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Error;
return function (_ErrorClass) {
inherits(CustomError, _ErrorClass);
function CustomError() {
var _ref;
classCallCheck(this, CustomError);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var _this = possibleConstructorReturn(this, (_ref = CustomError.__proto__ || Object.getPrototypeOf(CustomError)).call.apply(_ref, [this].concat(args)));
Error.captureStackTrace(_this, CustomError);
return _this;
}
return CustomError;
}(ErrorClass);
}

exports.Model = Model;
exports.Collection = Collection;
exports.Enum = Enum;
exports.Serializable = Serializable;
exports.ErrorFactory = ErrorFactory;
19 changes: 19 additions & 0 deletions dist/metamon.js
Original file line number Diff line number Diff line change
Expand Up @@ -18635,10 +18635,29 @@ var Metamon = (function (exports) {
Object.assign(this, defineProperty({}, value, value));
}

function ErrorFactory() {
var ErrorClass = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Error;
return function (_ErrorClass) {
inherits(CustomError, _ErrorClass);
function CustomError() {
var _ref;
classCallCheck(this, CustomError);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var _this = possibleConstructorReturn(this, (_ref = CustomError.__proto__ || Object.getPrototypeOf(CustomError)).call.apply(_ref, [this].concat(args)));
Error.captureStackTrace(_this, CustomError);
return _this;
}
return CustomError;
}(ErrorClass);
}

exports.Model = Model;
exports.Collection = Collection;
exports.Enum = Enum;
exports.Serializable = Serializable;
exports.ErrorFactory = ErrorFactory;

return exports;

Expand Down
2 changes: 1 addition & 1 deletion dist/metamon.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Collection.html
Original file line number Diff line number Diff line change
Expand Up @@ -1844,7 +1844,7 @@ <h5>Example</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Jul 31 2018 01:53:45 GMT-0700 (PDT) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Aug 19 2018 00:55:39 GMT-0700 (PDT) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Collection.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ <h1 class="page-title">Collection.js</h1>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Jul 31 2018 01:53:45 GMT-0700 (PDT) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Aug 19 2018 00:55:39 GMT-0700 (PDT) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Enum.html
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Jul 31 2018 01:53:45 GMT-0700 (PDT) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Aug 19 2018 00:55:39 GMT-0700 (PDT) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Enum.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ <h1 class="page-title">Enum.js</h1>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Jul 31 2018 01:53:45 GMT-0700 (PDT) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Aug 19 2018 00:55:39 GMT-0700 (PDT) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/MissingIndexError.html
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ <h3 class="subsection-title">Extends</h3>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Jul 31 2018 01:53:45 GMT-0700 (PDT) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Aug 19 2018 00:55:39 GMT-0700 (PDT) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Model.html
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Jul 31 2018 01:53:45 GMT-0700 (PDT) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Aug 19 2018 00:55:39 GMT-0700 (PDT) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Model.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ <h1 class="page-title">Model.js</h1>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Jul 31 2018 01:53:45 GMT-0700 (PDT) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Aug 19 2018 00:55:39 GMT-0700 (PDT) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Serializable.html
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Jul 31 2018 01:53:45 GMT-0700 (PDT) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Aug 19 2018 00:55:39 GMT-0700 (PDT) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Serializable.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ <h1 class="page-title">Serializable.js</h1>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Jul 31 2018 01:53:45 GMT-0700 (PDT) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Aug 19 2018 00:55:39 GMT-0700 (PDT) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/UnsupportedError.html
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ <h3 class="subsection-title">Extends</h3>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Jul 31 2018 01:53:45 GMT-0700 (PDT) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Aug 19 2018 00:55:39 GMT-0700 (PDT) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/errors.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ <h1 class="page-title">errors.js</h1>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Jul 31 2018 01:53:45 GMT-0700 (PDT) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Aug 19 2018 00:55:39 GMT-0700 (PDT) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ <h5>Parameters:</h5>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Jul 31 2018 01:53:45 GMT-0700 (PDT) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Aug 19 2018 00:55:39 GMT-0700 (PDT) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h4>jsDelivr CDN</h4><h5>Minified</h5><pre class="prettyprint source lang-html">
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Jul 31 2018 01:53:45 GMT-0700 (PDT) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Aug 19 2018 00:55:39 GMT-0700 (PDT) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
23 changes: 23 additions & 0 deletions lib/ErrorFactory.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"use strict";

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = ErrorFactory;
/**
*
* construct a custom error constructor and streamline
* the stack trace captured in the custom error
*
* @param {ErrorConstructor} (ErrorClass) [Error]
* @returns {Error}
*
*/
function ErrorFactory(ErrorClass = Error) {
return class CustomError extends ErrorClass {
constructor(...args) {
super(...args);
Error.captureStackTrace(this, CustomError);
}
};
}

0 comments on commit 9bff634

Please sign in to comment.