Skip to content

Commit cea3c04

Browse files
fix(publish): fix logic for getting the package distDir
1 parent 6739e70 commit cea3c04

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

publish_yalc_package.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function publishYalcPackage(installTargetDir, installSource, flags) {
9393
}
9494

9595
// If ngPackage is found in package.json, the directory to be published is actually ./dist
96-
const distDir = !!pkgJson.distDir || '.';
96+
const distDir = pkgJson.distDir || '.';
9797
if (!flags.noPublish) {
9898
shelljs.pushd(distDir);
9999
// Publish to local yalc registry

test_downstream_projects.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ function localPublish(packageDir) {
5353
// Un-yalc any deps in the package.json (after building, but before yalc publishing)
5454
const packageString = fs.readFileSync('package.json');
5555
const package = JSON.parse(packageString);
56-
const distDir = !!package.distDir || '.';
56+
const distDir = package.distDir || '.';
5757
const { resolutions = {}, dependencies = {}, devDependencies = {} } = package;
5858

5959
const yalcLockfile = fs.existsSync('yalc.lock') ? JSON.parse(fs.readFileSync('yalc.lock')) : {};
6060
const yalcPackages = Object.keys(yalcLockfile.packages || {})
6161

6262
yalcPackages.forEach(pkg => {
63-
delete resolutions[pkg]
63+
delete resolutions[pkg];
6464

6565
if (dependencies[pkg]) {
6666
dependencies[pkg] = yalcLockfile.packages[pkg].replaced;

0 commit comments

Comments
 (0)