feat(monorepo): build with esm modules (#8729)

fixes https://github.com/NativeScript/NativeScript/issues/8739
This commit is contained in:
Martin Guillon
2020-07-23 22:58:08 +02:00
committed by Nathan Walker
parent 5658e638d5
commit fc64fc3ed9
373 changed files with 2295 additions and 1453 deletions

View File

@@ -1,6 +1,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.XmlParser = exports.ParserEvent = exports.ParserEventType = void 0;
var easysax = require("../js-libs/easysax");
var easysax = require('../js-libs/easysax');
var easysax_1 = require("../js-libs/easysax");
var ParserEventType = (function () {
function ParserEventType() {
}
@@ -413,7 +414,7 @@ function _HandleAmpEntities(found, decimalValue, hexValue, wordValue) {
var XmlParser = (function () {
function XmlParser(onEvent, onError, processNamespaces) {
this._processNamespaces = processNamespaces;
this._parser = new easysax.EasySAXParser();
this._parser = new easysax_1.EasySAXParser();
var that = this;
this._parser.on('startNode', function (elem, attr, uq, tagend, str, pos) {
var attributes = attr();

View File

@@ -2,7 +2,8 @@
// https://github.com/NativeScript/nativescript-dev-webpack/issues/932
import * as definition from '.';
import * as easysax from '../js-libs/easysax';
const easysax = require('../js-libs/easysax');
import { EasySAXParser } from '../js-libs/easysax';
/**
* Defines a position within string, in line and column form.
@@ -423,14 +424,14 @@ function _HandleAmpEntities(found: string, decimalValue: string, hexValue: strin
export class XmlParser implements definition.XmlParser {
//TODO: Add option to configure whether the parser should report ignorable whitespace, i.e. document formatting whitespace.
private _parser: easysax.EasySAXParser;
private _parser: EasySAXParser;
private _processNamespaces: boolean;
private _namespaceStack: Array<any>;
constructor(onEvent: (event: definition.ParserEvent) => void, onError?: (error: Error, position: Position) => void, processNamespaces?: boolean) {
this._processNamespaces = processNamespaces;
this._parser = new easysax.EasySAXParser();
this._parser = new EasySAXParser();
const that = this;
this._parser.on('startNode', function (elem, attr, uq, tagend, str, pos) {