
net.jangaroo.jooc.mvnplugin.converter.PackageJsonPrettyPrinter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jangaroo-maven-plugin Show documentation
Show all versions of jangaroo-maven-plugin Show documentation
This plugin compiles Jangaroo sources to JavaScript.
The newest version!
package net.jangaroo.jooc.mvnplugin.converter;
import com.fasterxml.jackson.core.util.DefaultIndenter;
import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
public class PackageJsonPrettyPrinter extends DefaultPrettyPrinter {
private static final DefaultIndenter DEFAULT_INDENTER = new DefaultIndenter(" ", "\n");
public PackageJsonPrettyPrinter() {
super(new DefaultPrettyPrinter()
.withArrayIndenter(DEFAULT_INDENTER)
.withObjectIndenter(DEFAULT_INDENTER)
.withSpacesInObjectEntries());
// we want a space only after the colon:
_objectFieldValueSeparatorWithSpaces = _separators.getObjectFieldValueSeparator() + " ";
}
@Override
public DefaultPrettyPrinter createInstance() {
return new PackageJsonPrettyPrinter();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy