@extjs/sencha-cmd-linux-32
Version:
Productivity and performance optimization tool for building applications with Sencha Ext JS and Sencha Touch.
77 lines (60 loc) • 1.23 kB
JavaScript
/*
* Copyright (c) 2012-2016. Sencha Inc.
*/
;
var Fashion = require('./Base.js'),
Base = Fashion.Base;
class Output extends Base {
constructor() {
super();
this.output = '';
}
space() {
this.add(' ');
}
add(text) {
this.output += text;
}
addComment(text) {
this.output += text;
}
indent() {
this.indentation += this.indentstr;
}
unindent() {
this.indentation = this.indentation.substr(this.indentstr.length);
}
addln(ln) {
this.output += '\n' + this.indentation + (ln || '');
}
addCommentLn(ln) {
if (ln && ln.indexOf('//') === 0) {
return;
}
this.addln(ln)
}
get() {
return this.output;
}
indentln(ln) {
this.addln(ln);
this.indent();
}
unindentln(ln) {
this.unindent();
this.addln(ln);
}
reset() {
this.indentation = '';
this.output = '';
}
}
Fashion.apply(Output.prototype, {
indentation: '',
output: '',
isCompressed: false,
indentstr: ' ',
splitThreshold: 1000000,
selectorCount: 0
});
module.exports = Output;