Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
html_old /
pigeon /
node_modules /
stylus /
lib /
Delete
Unzip
Name
Size
Permission
Date
Action
convert
[ DIR ]
drwxr-xr-x
2022-06-27 18:41
functions
[ DIR ]
drwxr-xr-x
2022-06-27 18:41
nodes
[ DIR ]
drwxr-xr-x
2022-06-27 18:41
stack
[ DIR ]
drwxr-xr-x
2022-06-27 18:41
visitor
[ DIR ]
drwxr-xr-x
2022-06-27 18:41
colors.js
4.41
KB
-rw-r--r--
2012-10-23 18:12
errors.js
952
B
-rw-r--r--
2012-10-23 18:12
lexer.js
16.04
KB
-rw-r--r--
2012-11-20 21:56
middleware.js
5.69
KB
-rw-r--r--
2012-10-23 18:12
parser.js
33.51
KB
-rw-r--r--
2013-02-12 17:36
renderer.js
3.66
KB
-rw-r--r--
2013-01-03 17:17
stylus.js
1.64
KB
-rw-r--r--
2012-11-24 19:10
token.js
892
B
-rw-r--r--
2012-10-23 18:12
units.js
576
B
-rw-r--r--
2012-10-23 18:20
utils.js
6.35
KB
-rw-r--r--
2013-02-28 00:21
Save
Rename
/*! * Stylus - Renderer * Copyright(c) 2010 LearnBoost <dev@learnboost.com> * MIT Licensed */ /** * Module dependencies. */ var Parser = require('./parser') , EventEmitter = require('events').EventEmitter , Compiler = require('./visitor/compiler') , Evaluator = require('./visitor/evaluator') , Normalizer = require('./visitor/normalizer') , utils = require('./utils') , nodes = require('./nodes') , path = require('path') , join = path.join; /** * Expose `Renderer`. */ module.exports = Renderer; /** * Initialize a new `Renderer` with the given `str` and `options`. * * @param {String} str * @param {Object} options * @api public */ function Renderer(str, options) { options = options || {}; options.globals = {}; options.functions = {}; options.imports = [join(__dirname, 'functions')]; options.paths = options.paths || []; options.filename = options.filename || 'stylus'; this.options = options; this.str = str; }; /** * Inherit from `EventEmitter.prototype`. */ Renderer.prototype.__proto__ = EventEmitter.prototype; /** * Parse and evaluate AST, then callback `fn(err, css, js)`. * * @param {Function} fn * @api public */ Renderer.prototype.render = function(fn){ var parser = this.parser = new Parser(this.str, this.options); try { nodes.filename = this.options.filename; // parse var ast = parser.parse(); // evaluate this.evaluator = new Evaluator(ast, this.options); ast = this.evaluator.evaluate(); // normalize var normalizer = new Normalizer(ast, this.options); ast = normalizer.normalize(); // compile var compiler = new Compiler(ast, this.options) , css = compiler.compile(); this.emit('end', css); if (!fn) return css; fn(null, css); } catch (err) { var options = {}; options.input = err.input || this.str; options.filename = err.filename || this.options.filename; options.lineno = err.lineno || parser.lexer.lineno; if (!fn) throw utils.formatException(err, options); fn(utils.formatException(err, options)); } }; /** * Set option `key` to `val`. * * @param {String} key * @param {Mixed} val * @return {Renderer} for chaining * @api public */ Renderer.prototype.set = function(key, val){ this.options[key] = val; return this; }; /** * Get option `key`. * * @param {String} key * @return {Mixed} val * @api public */ Renderer.prototype.get = function(key){ return this.options[key]; }; /** * Include the given `path` to the lookup paths array. * * @param {String} path * @return {Renderer} for chaining * @api public */ Renderer.prototype.include = function(path){ this.options.paths.push(path); return this; }; /** * Use the given `fn`. * * This allows for plugins to alter the renderer in * any way they wish, exposing paths etc. * * @param {Function} * @return {Renderer} for chaining * @api public */ Renderer.prototype.use = function(fn){ fn.call(this, this); return this; }; /** * Define function or global var with the given `name`. Optionally * the function may accept full expressions, by setting `raw` * to `true`. * * @param {String} name * @param {Function|Node} fn * @return {Renderer} for chaining * @api public */ Renderer.prototype.define = function(name, fn, raw){ fn = utils.coerce(fn); if (fn.nodeName) { this.options.globals[name] = fn; return this; } // function this.options.functions[name] = fn; if (undefined != raw) fn.raw = raw; return this; }; /** * Import the given `file`. * * @param {String} file * @return {Renderer} for chaining * @api public */ Renderer.prototype.import = function(file){ this.options.imports.push(file); return this; };