/var/www/cobraambalaj/node_modules/postcss/lib
NameSizeModeActions
at-rule.d.ts22050644editdlrm
at-rule.js4740644editdlrm
comment.d.ts10950644editdlrm
comment.js2040644editdlrm
container.d.ts127260644editdlrm
container.js101830644editdlrm
css-syntax-error.d.ts48300644editdlrm
css-syntax-error.js22990644editdlrm
declaration.d.ts26500644editdlrm
declaration.js4970644editdlrm
fromJSON.d.ts1070644editdlrm
fromJSON.js15070644editdlrm
input.d.ts28160644editdlrm
input.js45490644editdlrm
lazy-result.d.ts48330644editdlrm
lazy-result.js122790644editdlrm
list.d.ts8500644editdlrm
list.js11700644editdlrm
map-generator.js73060644editdlrm
node.d.ts113480644editdlrm
node.js69090644editdlrm
parse.d.ts890644editdlrm
parse.js11480644editdlrm
parser.js133230644editdlrm
postcss.d.ts105690644editdlrm
postcss.js25130644editdlrm
postcss.mjs8550644editdlrm
previous-map.d.ts16180644editdlrm
previous-map.js39600644editdlrm
processor.d.ts29440644editdlrm
processor.js19650644editdlrm
result.d.ts40860644editdlrm
result.js7500644editdlrm
root.d.ts11950644editdlrm
root.js12130644editdlrm
rule.d.ts20780644editdlrm
rule.js5720644editdlrm
stringifier.js79960644editdlrm
stringify.d.ts1070644editdlrm
stringify.js2140644editdlrm
symbols.js570644editdlrm
terminal-highlight.js13600644editdlrm
tokenize.js65420644editdlrm
warn-once.js2250644editdlrm
warning.d.ts19350644editdlrm
warning.js6500644editdlrm
Edit: /var/www/cobraambalaj/node_modules/postcss/lib/terminal-highlight.js (1360B)
'use strict' let { cyan, gray, green, yellow, magenta } = require('colorette') let tokenizer = require('./tokenize') let Input function registerInput (dependant) { Input = dependant } const HIGHLIGHT_THEME = { 'brackets': cyan, 'at-word': cyan, 'comment': gray, 'string': green, 'class': yellow, 'hash': magenta, 'call': cyan, '(': cyan, ')': cyan, '{': yellow, '}': yellow, '[': yellow, ']': yellow, ':': yellow, ';': yellow } function getTokenType ([type, value], processor) { if (type === 'word') { if (value[0] === '.') { return 'class' } if (value[0] === '#') { return 'hash' } } if (!processor.endOfFile()) { let next = processor.nextToken() processor.back(next) if (next[0] === 'brackets' || next[0] === '(') return 'call' } return type } function terminalHighlight (css) { let processor = tokenizer(new Input(css), { ignoreErrors: true }) let result = '' while (!processor.endOfFile()) { let token = processor.nextToken() let color = HIGHLIGHT_THEME[getTokenType(token, processor)] if (color) { result += token[1] .split(/\r?\n/) .map(i => color(i)) .join('\n') } else { result += token[1] } } return result } terminalHighlight.registerInput = registerInput module.exports = terminalHighlight