Revert "chore: Remove unnecessary calls to Parse5DomAdapter"
This reverts commit 387a90e546
.
This commit is contained in:
parent
8a54c1a115
commit
80deac5cde
|
@ -1,4 +1,5 @@
|
||||||
require('reflect-metadata');
|
require('reflect-metadata');
|
||||||
|
require('@angular/platform-server/src/parse5_adapter.js').Parse5DomAdapter.makeCurrent();
|
||||||
require('zone.js/dist/zone-node.js');
|
require('zone.js/dist/zone-node.js');
|
||||||
require('zone.js/dist/long-stack-trace-zone.js');
|
require('zone.js/dist/long-stack-trace-zone.js');
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// TODO(alexeagle): maybe remove that check?
|
// TODO(alexeagle): maybe remove that check?
|
||||||
require('reflect-metadata');
|
require('reflect-metadata');
|
||||||
|
|
||||||
|
require('@angular/platform-server/src/parse5_adapter.js').Parse5DomAdapter.makeCurrent();
|
||||||
require('zone.js/dist/zone-node.js');
|
require('zone.js/dist/zone-node.js');
|
||||||
require('zone.js/dist/long-stack-trace-zone.js');
|
require('zone.js/dist/long-stack-trace-zone.js');
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
// Only needed to satisfy the check in core/src/util/decorators.ts
|
// Only needed to satisfy the check in core/src/util/decorators.ts
|
||||||
// TODO(alexeagle): maybe remove that check?
|
// TODO(alexeagle): maybe remove that check?
|
||||||
require('reflect-metadata');
|
require('reflect-metadata');
|
||||||
|
|
||||||
|
require('@angular/platform-server/src/parse5_adapter.js').Parse5DomAdapter.makeCurrent();
|
||||||
require('zone.js/dist/zone-node.js');
|
require('zone.js/dist/zone-node.js');
|
||||||
require('zone.js/dist/long-stack-trace-zone.js');
|
require('zone.js/dist/long-stack-trace-zone.js');
|
||||||
let serializer = require('@angular/compiler/src/i18n/xmb_serializer.js');
|
let serializer = require('@angular/compiler/src/i18n/xmb_serializer.js');
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
*/
|
*/
|
||||||
import * as compiler from '@angular/compiler';
|
import * as compiler from '@angular/compiler';
|
||||||
import {ViewEncapsulation} from '@angular/core';
|
import {ViewEncapsulation} from '@angular/core';
|
||||||
|
import {Parse5DomAdapter} from '@angular/platform-server';
|
||||||
import {AngularCompilerOptions} from '@angular/tsc-wrapped';
|
import {AngularCompilerOptions} from '@angular/tsc-wrapped';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as ts from 'typescript';
|
import * as ts from 'typescript';
|
||||||
|
@ -105,6 +106,8 @@ export class CodeGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
codegen(): Promise<any> {
|
codegen(): Promise<any> {
|
||||||
|
Parse5DomAdapter.makeCurrent();
|
||||||
|
|
||||||
let stylesheetPromises: Promise<any>[] = [];
|
let stylesheetPromises: Promise<any>[] = [];
|
||||||
const generateOneFile = (absSourcePath: string) =>
|
const generateOneFile = (absSourcePath: string) =>
|
||||||
Promise.all(this.readComponents(absSourcePath))
|
Promise.all(this.readComponents(absSourcePath))
|
||||||
|
|
|
@ -16,6 +16,8 @@ import {ViewEncapsulation} from '@angular/core';
|
||||||
import {StaticReflector} from './static_reflector';
|
import {StaticReflector} from './static_reflector';
|
||||||
import {CompileMetadataResolver, HtmlParser, DirectiveNormalizer, Lexer, Parser, TemplateParser, DomElementSchemaRegistry, StyleCompiler, ViewCompiler, TypeScriptEmitter, MessageExtractor, removeDuplicates, ExtractionResult, Message, ParseError, serializeXmb,} from './compiler_private';
|
import {CompileMetadataResolver, HtmlParser, DirectiveNormalizer, Lexer, Parser, TemplateParser, DomElementSchemaRegistry, StyleCompiler, ViewCompiler, TypeScriptEmitter, MessageExtractor, removeDuplicates, ExtractionResult, Message, ParseError, serializeXmb,} from './compiler_private';
|
||||||
|
|
||||||
|
import {Parse5DomAdapter} from '@angular/platform-server';
|
||||||
|
|
||||||
import {ReflectorHost} from './reflector_host';
|
import {ReflectorHost} from './reflector_host';
|
||||||
import {StaticAndDynamicReflectionCapabilities} from './static_reflection_capabilities';
|
import {StaticAndDynamicReflectionCapabilities} from './static_reflection_capabilities';
|
||||||
|
|
||||||
|
@ -95,6 +97,7 @@ class Extractor {
|
||||||
}
|
}
|
||||||
|
|
||||||
extract(): Promise<any> {
|
extract(): Promise<any> {
|
||||||
|
Parse5DomAdapter.makeCurrent();
|
||||||
_dirPaths.clear();
|
_dirPaths.clear();
|
||||||
|
|
||||||
const promises = this._program.getSourceFiles()
|
const promises = this._program.getSourceFiles()
|
||||||
|
|
Loading…
Reference in New Issue