aboutsummaryrefslogtreecommitdiff
path: root/node_modules/stylus/lib/stylus.js
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2018-11-08 00:38:48 +0800
committerruki <waruqi@gmail.com>2018-11-07 21:53:09 +0800
commit26105034da4fcce7ac883c899d781f016559310d (patch)
treec459a5dc4e3aa0972d9919033ece511ce76dd129 /node_modules/stylus/lib/stylus.js
parent2c77f00f1a7ecb6c8192f9c16d3b2001b254a107 (diff)
downloadxmake-docs-26105034da4fcce7ac883c899d781f016559310d.tar.gz
xmake-docs-26105034da4fcce7ac883c899d781f016559310d.zip
switch to vuepress
Diffstat (limited to 'node_modules/stylus/lib/stylus.js')
-rw-r--r--node_modules/stylus/lib/stylus.js103
1 files changed, 103 insertions, 0 deletions
diff --git a/node_modules/stylus/lib/stylus.js b/node_modules/stylus/lib/stylus.js
new file mode 100644
index 00000000..6c064a2d
--- /dev/null
+++ b/node_modules/stylus/lib/stylus.js
@@ -0,0 +1,103 @@
+/*!
+ * Stylus
+ * Copyright (c) Automattic <developer.wordpress.com>
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var Renderer = require('./renderer')
+ , nodes = require('./nodes')
+ , utils = require('./utils');
+
+/**
+ * Export render as the module.
+ */
+
+exports = module.exports = render;
+
+/**
+ * Library version.
+ */
+
+exports.version = require('../package').version;
+
+/**
+ * Expose nodes.
+ */
+
+exports.nodes = nodes;
+
+/**
+ * Expose BIFs.
+ */
+
+exports.functions = require('./functions');
+
+/**
+ * Expose utils.
+ */
+
+exports.utils = require('./utils');
+
+/**
+ * Expose middleware.
+ */
+
+exports.middleware = require('./middleware');
+
+/**
+ * Expose constructors.
+ */
+
+exports.Visitor = require('./visitor');
+exports.Parser = require('./parser');
+exports.Evaluator = require('./visitor/evaluator');
+exports.Normalizer = require('./visitor/normalizer');
+exports.Compiler = require('./visitor/compiler');
+
+/**
+ * Convert the given `css` to `stylus` source.
+ *
+ * @param {String} css
+ * @return {String}
+ * @api public
+ */
+
+exports.convertCSS = require('./convert/css');
+
+/**
+ * Render the given `str` with `options` and callback `fn(err, css)`.
+ *
+ * @param {String} str
+ * @param {Object|Function} options
+ * @param {Function} fn
+ * @api public
+ */
+
+exports.render = function(str, options, fn){
+ if ('function' == typeof options) fn = options, options = {};
+ return new Renderer(str, options).render(fn);
+};
+
+/**
+ * Return a new `Renderer` for the given `str` and `options`.
+ *
+ * @param {String} str
+ * @param {Object} options
+ * @return {Renderer}
+ * @api public
+ */
+
+function render(str, options) {
+ return new Renderer(str, options);
+}
+
+/**
+ * Expose optional functions.
+ */
+
+exports.url = require('./functions/url');
+exports.resolver = require('./functions/resolver');