source: trip-planner-front/node_modules/stylus/lib/stylus.js@ fa375fe

Last change on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*!
2 * Stylus
3 * Copyright (c) Automattic <developer.wordpress.com>
4 * MIT Licensed
5 */
6
7/**
8 * Module dependencies.
9 */
10
11var Renderer = require('./renderer')
12 , nodes = require('./nodes')
13 , utils = require('./utils');
14
15/**
16 * Export render as the module.
17 */
18
19exports = module.exports = render;
20
21/**
22 * Library version.
23 */
24
25exports.version = require('../package').version;
26
27/**
28 * Expose nodes.
29 */
30
31exports.nodes = nodes;
32
33/**
34 * Expose BIFs.
35 */
36
37exports.functions = require('./functions');
38
39/**
40 * Expose utils.
41 */
42
43exports.utils = require('./utils');
44
45/**
46 * Expose middleware.
47 */
48
49exports.middleware = require('./middleware');
50
51/**
52 * Expose constructors.
53 */
54
55exports.Visitor = require('./visitor');
56exports.Parser = require('./parser');
57exports.Evaluator = require('./visitor/evaluator');
58exports.Normalizer = require('./visitor/normalizer');
59exports.Compiler = require('./visitor/compiler');
60
61/**
62 * Convert the given `css` to `stylus` source.
63 *
64 * @param {String} css
65 * @return {String}
66 * @api public
67 */
68
69exports.convertCSS = require('./convert/css');
70
71/**
72 * Render the given `str` with `options` and callback `fn(err, css)`.
73 *
74 * @param {String} str
75 * @param {Object|Function} options
76 * @param {Function} fn
77 * @api public
78 */
79
80exports.render = function(str, options, fn){
81 if ('function' == typeof options) fn = options, options = {};
82 return new Renderer(str, options).render(fn);
83};
84
85/**
86 * Return a new `Renderer` for the given `str` and `options`.
87 *
88 * @param {String} str
89 * @param {Object} options
90 * @return {Renderer}
91 * @api public
92 */
93
94function render(str, options) {
95 return new Renderer(str, options);
96}
97
98/**
99 * Expose optional functions.
100 */
101
102exports.url = require('./functions/url');
103exports.resolver = require('./functions/resolver');
Note: See TracBrowser for help on using the repository browser.