mirror of
https://github.com/thangisme/notes.git
synced 2024-11-09 07:27:35 -05:00
124 lines
12 KiB
JavaScript
124 lines
12 KiB
JavaScript
'use strict';
|
|
|
|
exports.__esModule = true;
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
var defaultRaw = {
|
|
colon: ': ',
|
|
indent: ' ',
|
|
commentLeft: ' ',
|
|
commentRight: ' '
|
|
};
|
|
|
|
var Stringifier = function () {
|
|
function Stringifier(builder) {
|
|
_classCallCheck(this, Stringifier);
|
|
|
|
this.builder = builder;
|
|
}
|
|
|
|
Stringifier.prototype.stringify = function stringify(node, semicolon) {
|
|
this[node.type](node, semicolon);
|
|
};
|
|
|
|
Stringifier.prototype.root = function root(node) {
|
|
this.body(node);
|
|
if (node.raws.after) this.builder(node.raws.after);
|
|
};
|
|
|
|
Stringifier.prototype.comment = function comment(node) {
|
|
var left = defaultRaw.commentLeft;
|
|
var right = defaultRaw.commentRight;
|
|
if (this.has(node.raws.left)) left = node.raws.left;
|
|
|
|
if (node.raws.inline) {
|
|
if (this.has(node.raws.inlineRight)) {
|
|
right = node.raws.inlineRight;
|
|
} else {
|
|
right = '';
|
|
}
|
|
this.builder('//' + left + node.text + right, node);
|
|
} else {
|
|
if (this.has(node.raws.right)) right = node.raws.right;
|
|
this.builder('/*' + left + node.text + right + '*/', node);
|
|
}
|
|
};
|
|
|
|
Stringifier.prototype.decl = function decl(node) {
|
|
var between = node.raws.between || defaultRaw.colon;
|
|
var string = node.prop + between + this.rawValue(node, 'value');
|
|
|
|
if (node.important) {
|
|
string += node.raws.important || ' !important';
|
|
}
|
|
|
|
this.builder(string, node);
|
|
};
|
|
|
|
Stringifier.prototype.rule = function rule(node) {
|
|
this.block(node, this.rawValue(node, 'selector'));
|
|
};
|
|
|
|
Stringifier.prototype.atrule = function atrule(node) {
|
|
var name = '@' + node.name;
|
|
var params = node.params ? this.rawValue(node, 'params') : '';
|
|
|
|
if (this.has(node.raws.afterName)) {
|
|
name += node.raws.afterName;
|
|
} else if (params) {
|
|
name += ' ';
|
|
}
|
|
|
|
this.block(node, name + params);
|
|
};
|
|
|
|
Stringifier.prototype.body = function body(node) {
|
|
var indent = node.root().raws.indent || defaultRaw.indent;
|
|
|
|
for (var i = 0; i < node.nodes.length; i++) {
|
|
var child = node.nodes[i];
|
|
var before = child.raws.before.replace(/[^\n]*$/, '') + this.indent(node, indent);
|
|
if (child.type === 'comment' && child.raws.before.indexOf('\n') === -1) {
|
|
before = child.raws.before;
|
|
}
|
|
if (before) this.builder(before);
|
|
this.stringify(child);
|
|
}
|
|
};
|
|
|
|
Stringifier.prototype.block = function block(node, start) {
|
|
var between = node.raws.sssBetween || '';
|
|
this.builder(start + between, node, 'start');
|
|
if (this.has(node.nodes)) this.body(node);
|
|
};
|
|
|
|
Stringifier.prototype.indent = function indent(node, step) {
|
|
var result = '';
|
|
while (node.parent) {
|
|
result += step;
|
|
node = node.parent;
|
|
}
|
|
return result;
|
|
};
|
|
|
|
Stringifier.prototype.has = function has(value) {
|
|
return typeof value !== 'undefined';
|
|
};
|
|
|
|
Stringifier.prototype.rawValue = function rawValue(node, prop) {
|
|
var value = node[prop];
|
|
var raw = node.raws[prop];
|
|
if (raw && raw.value === value) {
|
|
return raw.sss || raw.raw;
|
|
} else {
|
|
return value;
|
|
}
|
|
};
|
|
|
|
return Stringifier;
|
|
}();
|
|
|
|
exports.default = Stringifier;
|
|
module.exports = exports['default'];
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0cmluZ2lmaWVyLmVzNiJdLCJuYW1lcyI6WyJkZWZhdWx0UmF3IiwiY29sb24iLCJpbmRlbnQiLCJjb21tZW50TGVmdCIsImNvbW1lbnRSaWdodCIsIlN0cmluZ2lmaWVyIiwiYnVpbGRlciIsInN0cmluZ2lmeSIsIm5vZGUiLCJzZW1pY29sb24iLCJ0eXBlIiwicm9vdCIsImJv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nQnO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5idWlsZGVyKHN0cmluZywgbm9kZSk7XG4gICAgfVxuXG4gICAgcnVsZShub2RlKSB7XG4gICAgICAgIHRoaXMuYmxvY2sobm9kZSwgdGhpcy5yYXdWYWx1ZShub2RlLCAnc2VsZWN0b3InKSk7XG4gICAgfVxuXG4gICAgYXRydWxlKG5vZGUpIHtcbiAgICAgICAgbGV0IG5hbWUgICA9ICdAJyArIG5vZGUubmFtZTtcbiAgICAgICAgbGV0IHBhcmFtcyA9IG5vZGUucGFyYW1zID8gdGhpcy5yYXdWYWx1ZShub2RlLCAncGFyYW1zJykgOiAnJztcblxuICAgICAgICBpZiAoIHRoaXMuaGFzKG5vZGUucmF3cy5hZnRlck5hbWUpICkge1xuICAgICAgICAgICAgbmFtZSArPSBub2RlLnJhd3MuYWZ0ZXJOYW1lO1xuICAgICAgICB9IGVsc2UgaWYgKCBwYXJhbXMgKSB7XG4gICAgICAgICAgICBuYW1lICs9ICcgJztcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuYmxvY2sobm9kZSwgbmFtZSArIHBhcmFtcyk7XG4gICAgfVxuXG4gICAgYm9keShub2RlKSB7XG4gICAgICAgIGxldCBpbmRlbnQgPSBub2RlLnJvb3QoKS5yYXdzLmluZGVudCB8fCBkZWZhdWx0UmF3LmluZGVudDtcblxuICAgICAgICBmb3IgKCBsZXQgaSA9IDA7IGkgPCBub2RlLm5vZGVzLmxlbmd0aDsgaSsrICkge1xuICAgICAgICAgICAgbGV0IGNoaWxkICA9IG5vZGUubm9kZXNbaV07XG4gICAgICAgICAgICBsZXQgYmVmb3JlID0gY2hpbGQucmF3cy5iZWZvcmUucmVwbGFjZSgvW15cXG5dKiQvLCAnJykgK1xuICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuaW5kZW50KG5vZGUsIGluZGVudCk7XG4gICAgICAgICAgICBpZiAoIGNoaWxkLnR5cGUgPT09ICdjb21tZW50JyAmJlxuICAg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