typescript-cp
Advanced tools
Comparing version 0.1.8 to 0.1.9
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.1.9](https://github.com/body-builder/typescript-cp/compare/v0.1.8...v0.1.9) (2023-07-20) | ||
### Features | ||
* Ignore projects where emitting is disabled ([#15](https://github.com/body-builder/typescript-cp/issues/15)) ([a385078](https://github.com/body-builder/typescript-cp/commit/a38507884110fb07e2f3753df3013ca9f0abfce3)) | ||
### [0.1.8](https://github.com/body-builder/typescript-cp/compare/v0.1.7...v0.1.8) (2023-05-07) | ||
@@ -7,0 +14,0 @@ |
@@ -228,3 +228,3 @@ "use strict"; | ||
var exclude = ts_config.raw.exclude; | ||
var _a = ts_config.options, rootDir = _a.rootDir, outDir = _a.outDir; | ||
var _a = ts_config.options, rootDir = _a.rootDir, outDir = _a.outDir, noEmit = _a.noEmit; | ||
if (!rootDir) { | ||
@@ -243,2 +243,3 @@ throw new Error("No 'rootDir' configured in reference '".concat(referenceName, "'")); | ||
exclude: exclude || [], | ||
no_emit: noEmit !== null && noEmit !== void 0 ? noEmit : false, | ||
}; | ||
@@ -252,3 +253,7 @@ } | ||
var cwd = options.cwd, cli_options = options.cli_options, ts_config = options.ts_config; | ||
return build_project_path(cwd, cli_options.project, ts_config); | ||
var project = build_project_path(cwd, cli_options.project, ts_config); | ||
if (project.no_emit) { | ||
throw new Error('Project must have emitting enabled'); | ||
} | ||
return project; | ||
} | ||
@@ -265,3 +270,3 @@ exports.get_ts_project_paths = get_ts_project_paths; | ||
} | ||
return ts_config.projectReferences.map(function (reference) { | ||
var projects = ts_config.projectReferences.map(function (reference) { | ||
if (!reference.path) { | ||
@@ -277,2 +282,7 @@ throw new Error('Could not find project reference path'); | ||
}); | ||
var projects_with_emit = projects.filter(function (project) { return !project.no_emit; }); | ||
if (projects_with_emit.length === 0) { | ||
throw new Error('At least one project must have emitting enabled'); | ||
} | ||
return projects_with_emit; | ||
} | ||
@@ -279,0 +289,0 @@ exports.get_ts_projects_paths = get_ts_projects_paths; |
@@ -52,2 +52,3 @@ import { ParsedCommandLine } from 'typescript'; | ||
exclude: string[]; | ||
no_emit: boolean; | ||
}; | ||
@@ -54,0 +55,0 @@ export type TsProjectWithFiles = TsProject & { |
{ | ||
"name": "typescript-cp", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "Copy non-typescript files to outDir", | ||
@@ -28,3 +28,3 @@ "homepage": "https://github.com/body-builder/typescript-cp#readme", | ||
"clean": "git clean -Xdf --exclude=!node_modules --exclude=!.idea --exclude !.idea/workspace.xml", | ||
"release": "standard-version --sign", | ||
"release": "standard-version", | ||
"prepack": "npm run clean && npm run build" | ||
@@ -31,0 +31,0 @@ }, |
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
62463
1210