@nx-dotnet/utils
Advanced tools
Comparing version 0.0.6-dev.65 to 0.1.0-dev.1
{ | ||
"name": "@nx-dotnet/utils", | ||
"version": "0.0.6-dev.65", | ||
"main": "src/index.js", | ||
@@ -9,3 +8,4 @@ "private": false, | ||
"rimraf": "^3.0.2" | ||
} | ||
}, | ||
"version": "0.1.0-dev.1" | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.findProjectFileInPath = exports.glob = void 0; | ||
exports.findProjectFileInPathSync = exports.findProjectFileInPath = exports.glob = void 0; | ||
const _glob = require("glob"); | ||
const glob_1 = require("glob"); | ||
/** | ||
@@ -15,3 +16,3 @@ * Wraps the glob package in a promise api. | ||
console.log(`Looking for project files at '${path}/**/*.*proj'`); | ||
return glob(`${path}/**/*.*proj`).then(results => { | ||
return glob(`${path}/**/*.*proj`).then((results) => { | ||
if (!results || results.length === 0) { | ||
@@ -27,2 +28,14 @@ throw new Error("Unable to find a build-able project within project's source directory!"); | ||
exports.findProjectFileInPath = findProjectFileInPath; | ||
function findProjectFileInPathSync(path) { | ||
console.log(`Looking for project files at '${path}/**/*.*proj'`); | ||
const results = glob_1.sync(`${path}/**/*.*proj`); | ||
if (!results || results.length === 0) { | ||
throw new Error("Unable to find a build-able project within project's source directory!"); | ||
} | ||
if (results.length > 1) { | ||
throw new Error(`More than one build-able projects are contained within the project's source directory! \r\n ${results.join(', \r\n')}`); | ||
} | ||
return results[0]; | ||
} | ||
exports.findProjectFileInPathSync = findProjectFileInPathSync; | ||
//# sourceMappingURL=glob.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getProjectFileForNxProject = void 0; | ||
exports.getProjectFileForNxProjectSync = exports.getProjectFileForNxProject = void 0; | ||
const tslib_1 = require("tslib"); | ||
@@ -13,2 +13,7 @@ const glob_1 = require("./glob"); | ||
exports.getProjectFileForNxProject = getProjectFileForNxProject; | ||
function getProjectFileForNxProjectSync(project) { | ||
const srcDirectory = project.root; | ||
return glob_1.findProjectFileInPathSync(srcDirectory); | ||
} | ||
exports.getProjectFileForNxProjectSync = getProjectFileForNxProjectSync; | ||
//# sourceMappingURL=workspace.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
9353
113