Skip to content

Commit

Permalink
refactor: remove jsdoc comments from global API
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Sep 25, 2017
1 parent 50c91f5 commit 9136b0b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 66 deletions.
33 changes: 0 additions & 33 deletions dist/moon.js
Original file line number Diff line number Diff line change
Expand Up @@ -1418,68 +1418,35 @@


/* ======= Global API ======= */
/**
* Configuration of Moon
*/
Moon.config = {
silent: ("development" === "production") || (typeof console === "undefined")
}

/**
* Version of Moon
*/
Moon.version = "0.11.0";

/**
* Moon Utilities
*/
Moon.util = {
noop: noop,
log: log,
error: error,
m: m
}

/**
* Runs an external Plugin
* @param {Object} plugin
* @param {Object} options
*/
Moon.use = function(plugin, options) {
plugin.init(Moon, options);
}

/**
* Compiles HTML to a Render Function
* @param {String} template
* @return {Function} render function
*/
Moon.compile = function(template) {
return compile(template);
}

/**
* Runs a Task After Update Queue
* @param {Function} task
*/
Moon.nextTick = function(task) {
setTimeout(task, 0);
}

/**
* Creates a Directive
* @param {String} name
* @param {Function} action
*/
Moon.directive = function(name, action) {
directives["m-" + name] = action;
}

/**
* Creates a Component
* @param {String} name
* @param {Object} options
*/
Moon.extend = function(name, options) {
options.name = name;

Expand Down
33 changes: 0 additions & 33 deletions src/global/api.js
Original file line number Diff line number Diff line change
@@ -1,65 +1,32 @@
/**
* Configuration of Moon
*/
Moon.config = {
silent: ("__ENV__" === "production") || (typeof console === "undefined")
}

/**
* Version of Moon
*/
Moon.version = "__VERSION__";

/**
* Moon Utilities
*/
Moon.util = {
noop: noop,
log: log,
error: error,
m: m
}

/**
* Runs an external Plugin
* @param {Object} plugin
* @param {Object} options
*/
Moon.use = function(plugin, options) {
plugin.init(Moon, options);
}

/**
* Compiles HTML to a Render Function
* @param {String} template
* @return {Function} render function
*/
Moon.compile = function(template) {
return compile(template);
}

/**
* Runs a Task After Update Queue
* @param {Function} task
*/
Moon.nextTick = function(task) {
setTimeout(task, 0);
}

/**
* Creates a Directive
* @param {String} name
* @param {Function} action
*/
Moon.directive = function(name, action) {
directives["m-" + name] = action;
}

/**
* Creates a Component
* @param {String} name
* @param {Object} options
*/
Moon.extend = function(name, options) {
options.name = name;

Expand Down

0 comments on commit 9136b0b

Please sign in to comment.