single-spa-angular
Advanced tools
Comparing version 4.3.1 to 4.3.2
{ | ||
"$schema": "../node_modules/ng-packagr/ng-package.schema.json", | ||
"name": "single-spa-angular", | ||
"version": "4.3.1", | ||
"version": "4.3.2", | ||
"description": "Helpers for building single-spa applications which use Angular 2", | ||
@@ -6,0 +6,0 @@ "schematics": "./schematics/schematics.json", |
@@ -9,2 +9,4 @@ "use strict"; | ||
const dependencies_2 = require("./dependencies"); | ||
const json_utils_1 = require("@schematics/angular/utility/json-utils"); | ||
const core_1 = require("@angular-devkit/core"); | ||
function default_1(options) { | ||
@@ -107,8 +109,22 @@ return schematics_1.chain([ | ||
const tsConfigFileName = clientProject.architect.build.options.tsConfig; | ||
const tsConfig = host.read(tsConfigFileName).toString('utf-8'); | ||
const json = JSON.parse(tsConfig); | ||
json.files = ['src/main.single-spa.ts']; | ||
const buffer = host.read(tsConfigFileName); | ||
if (!buffer) { | ||
return; | ||
} | ||
const tsCfgAst = core_1.parseJsonAst(buffer.toString(), core_1.JsonParseMode.Loose); | ||
if (tsCfgAst.kind !== 'object') { | ||
return; | ||
} | ||
const files = json_utils_1.findPropertyInAstObject(tsCfgAst, 'files'); | ||
if (files && files.kind !== 'array') { | ||
return; | ||
} | ||
// The "files" property will only contain path to `main.single-spa.ts` file, | ||
// because we remove `polyfills` from Webpack `entry` property. | ||
host.overwrite(tsConfigFileName, JSON.stringify(json, null, 2)); | ||
const recorder = host.beginUpdate(tsConfigFileName); | ||
if (files) { | ||
json_utils_1.removePropertyInAstObject(recorder, tsCfgAst, 'files'); | ||
} | ||
json_utils_1.insertPropertyInAstObjectInOrder(recorder, tsCfgAst, 'files', ['src/main.single-spa.ts'], 2); | ||
host.commitUpdate(recorder); | ||
} | ||
@@ -115,0 +131,0 @@ function addNPMScripts(options) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
425437
3068