/
var
/
www
/
cobraambalaj
/
node_modules
/
postcss
/
lib
/
/var/www/cobraambalaj/node_modules/postcss/lib
mkdir
upload
Name
Size
Mode
Actions
at-rule.d.ts
2205
0644
edit
dl
rm
at-rule.js
474
0644
edit
dl
rm
comment.d.ts
1095
0644
edit
dl
rm
comment.js
204
0644
edit
dl
rm
container.d.ts
12726
0644
edit
dl
rm
container.js
10183
0644
edit
dl
rm
css-syntax-error.d.ts
4830
0644
edit
dl
rm
css-syntax-error.js
2299
0644
edit
dl
rm
declaration.d.ts
2650
0644
edit
dl
rm
declaration.js
497
0644
edit
dl
rm
fromJSON.d.ts
107
0644
edit
dl
rm
fromJSON.js
1507
0644
edit
dl
rm
input.d.ts
2816
0644
edit
dl
rm
input.js
4549
0644
edit
dl
rm
lazy-result.d.ts
4833
0644
edit
dl
rm
lazy-result.js
12279
0644
edit
dl
rm
list.d.ts
850
0644
edit
dl
rm
list.js
1170
0644
edit
dl
rm
map-generator.js
7306
0644
edit
dl
rm
node.d.ts
11348
0644
edit
dl
rm
node.js
6909
0644
edit
dl
rm
parse.d.ts
89
0644
edit
dl
rm
parse.js
1148
0644
edit
dl
rm
parser.js
13323
0644
edit
dl
rm
postcss.d.ts
10569
0644
edit
dl
rm
postcss.js
2513
0644
edit
dl
rm
postcss.mjs
855
0644
edit
dl
rm
previous-map.d.ts
1618
0644
edit
dl
rm
previous-map.js
3960
0644
edit
dl
rm
processor.d.ts
2944
0644
edit
dl
rm
processor.js
1965
0644
edit
dl
rm
result.d.ts
4086
0644
edit
dl
rm
result.js
750
0644
edit
dl
rm
root.d.ts
1195
0644
edit
dl
rm
root.js
1213
0644
edit
dl
rm
rule.d.ts
2078
0644
edit
dl
rm
rule.js
572
0644
edit
dl
rm
stringifier.js
7996
0644
edit
dl
rm
stringify.d.ts
107
0644
edit
dl
rm
stringify.js
214
0644
edit
dl
rm
symbols.js
57
0644
edit
dl
rm
terminal-highlight.js
1360
0644
edit
dl
rm
tokenize.js
6542
0644
edit
dl
rm
warn-once.js
225
0644
edit
dl
rm
warning.d.ts
1935
0644
edit
dl
rm
warning.js
650
0644
edit
dl
rm
Edit:
/var/www/cobraambalaj/node_modules/postcss/lib/node.js
(6909B)
'use strict' let CssSyntaxError = require('./css-syntax-error') let Stringifier = require('./stringifier') let { isClean } = require('./symbols') let stringify = require('./stringify') function cloneNode (obj, parent) { let cloned = new obj.constructor() for (let i in obj) { if (!Object.prototype.hasOwnProperty.call(obj, i)) { // istanbul ignore next continue } if (i === 'proxyCache') continue let value = obj[i] let type = typeof value if (i === 'parent' && type === 'object') { if (parent) cloned[i] = parent } else if (i === 'source') { cloned[i] = value } else if (Array.isArray(value)) { cloned[i] = value.map(j => cloneNode(j, cloned)) } else { if (type === 'object' && value !== null) value = cloneNode(value) cloned[i] = value } } return cloned } class Node { constructor (defaults = {}) { this.raws = {} this[isClean] = false for (let name in defaults) { if (name === 'nodes') { this.nodes = [] for (let node of defaults[name]) { if (typeof node.clone === 'function') { this.append(node.clone()) } else { this.append(node) } } } else { this[name] = defaults[name] } } } error (message, opts = {}) { if (this.source) { let pos = this.positionBy(opts) return this.source.input.error(message, pos.line, pos.column, opts) } return new CssSyntaxError(message) } warn (result, text, opts) { let data = { node: this } for (let i in opts) data[i] = opts[i] return result.warn(text, data) } remove () { if (this.parent) { this.parent.removeChild(this) } this.parent = undefined return this } toString (stringifier = stringify) { if (stringifier.stringify) stringifier = stringifier.stringify let result = '' stringifier(this, i => { result += i }) return result } clone (overrides = {}) { let cloned = cloneNode(this) for (let name in overrides) { cloned[name] = overrides[name] } return cloned } cloneBefore (overrides = {}) { let cloned = this.clone(overrides) this.parent.insertBefore(this, cloned) return cloned } cloneAfter (overrides = {}) { let cloned = this.clone(overrides) this.parent.insertAfter(this, cloned) return cloned } replaceWith (...nodes) { if (this.parent) { let bookmark = this let foundSelf = false for (let node of nodes) { if (node === this) { foundSelf = true } else if (foundSelf) { this.parent.insertAfter(bookmark, node) bookmark = node } else { this.parent.insertBefore(bookmark, node) } } if (!foundSelf) { this.remove() } } return this } next () { if (!this.parent) return undefined let index = this.parent.index(this) return this.parent.nodes[index + 1] } prev () { if (!this.parent) return undefined let index = this.parent.index(this) return this.parent.nodes[index - 1] } before (add) { this.parent.insertBefore(this, add) return this } after (add) { this.parent.insertAfter(this, add) return this } root () { let result = this while (result.parent) result = result.parent return result } raw (prop, defaultType) { let str = new Stringifier() return str.raw(this, prop, defaultType) } cleanRaws (keepBetween) { delete this.raws.before delete this.raws.after if (!keepBetween) delete this.raws.between } toJSON (_, inputs) { let fixed = {} let emitInputs = inputs == null inputs = inputs || new Map() let inputsNextIndex = 0 for (let name in this) { if (!Object.prototype.hasOwnProperty.call(this, name)) { // istanbul ignore next continue } if (name === 'parent' || name === 'proxyCache') continue let value = this[name] if (Array.isArray(value)) { fixed[name] = value.map(i => { if (typeof i === 'object' && i.toJSON) { return i.toJSON(null, inputs) } else { return i } }) } else if (typeof value === 'object' && value.toJSON) { fixed[name] = value.toJSON(null, inputs) } else if (name === 'source') { let inputId = inputs.get(value.input) if (inputId == null) { inputId = inputsNextIndex inputs.set(value.input, inputsNextIndex) inputsNextIndex++ } fixed[name] = { inputId, start: value.start, end: value.end } } else { fixed[name] = value } } if (emitInputs) { fixed.inputs = [...inputs.keys()].map(input => input.toJSON()) } return fixed } positionInside (index) { let string = this.toString() let column = this.source.start.column let line = this.source.start.line for (let i = 0; i < index; i++) { if (string[i] === '\n') { column = 1 line += 1 } else { column += 1 } } return { line, column } } positionBy (opts) { let pos = this.source.start if (opts.index) { pos = this.positionInside(opts.index) } else if (opts.word) { let index = this.toString().indexOf(opts.word) if (index !== -1) pos = this.positionInside(index) } return pos } getProxyProcessor () { return { set (node, prop, value) { if (node[prop] === value) return true node[prop] = value if ( prop === 'prop' || prop === 'value' || prop === 'name' || prop === 'params' || prop === 'important' || prop === 'text' ) { node.markDirty() } return true }, get (node, prop) { if (prop === 'proxyOf') { return node } else if (prop === 'root') { return () => node.root().toProxy() } else { return node[prop] } } } } toProxy () { if (!this.proxyCache) { this.proxyCache = new Proxy(this, this.getProxyProcessor()) } return this.proxyCache } addToError (error) { error.postcssNode = this if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) { let s = this.source error.stack = error.stack.replace( /\n\s{4}at /, `$&${s.input.from}:${s.start.line}:${s.start.column}$&` ) } return error } markDirty () { if (this[isClean]) { this[isClean] = false let next = this while ((next = next.parent)) { next[isClean] = false } } } get proxyOf () { return this } } module.exports = Node Node.default = Node
Save
cmd:
run