@nx-go/nx-go
Advanced tools
Comparing version 2.0.0-beta.3 to 2.0.0-beta.4
{ | ||
"name": "@nx-go/nx-go", | ||
"version": "2.0.0-beta.3", | ||
"version": "2.0.0-beta.4", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "generators": "./generators.json", |
@@ -6,4 +6,7 @@ "use strict"; | ||
function runExecutor(options, context) { | ||
var _a, _b; | ||
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () { | ||
const cwd = `${context.root}`; | ||
const projectName = context === null || context === void 0 ? void 0 : context.projectName; | ||
const sourceRoot = (_b = (_a = context === null || context === void 0 ? void 0 : context.workspace) === null || _a === void 0 ? void 0 : _a.projects[projectName]) === null || _b === void 0 ? void 0 : _b.root; | ||
const cwd = `${sourceRoot}`; | ||
const sources = `./...`; | ||
@@ -10,0 +13,0 @@ return (0, utils_1.runGoCommand)(context, 'fmt', [sources], { cwd }); |
@@ -9,3 +9,3 @@ "use strict"; | ||
const projectName = context === null || context === void 0 ? void 0 : context.projectName; | ||
const sourceRoot = (_b = (_a = context === null || context === void 0 ? void 0 : context.workspace) === null || _a === void 0 ? void 0 : _a.projects[projectName]) === null || _b === void 0 ? void 0 : _b.sourceRoot; | ||
const sourceRoot = (_b = (_a = context === null || context === void 0 ? void 0 : context.workspace) === null || _a === void 0 ? void 0 : _a.projects[projectName]) === null || _b === void 0 ? void 0 : _b.root; | ||
const cwd = `${options.cwd || sourceRoot}`; | ||
@@ -12,0 +12,0 @@ // We strip the project root from the main file |
@@ -6,4 +6,7 @@ "use strict"; | ||
function runExecutor(options, context) { | ||
var _a, _b; | ||
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () { | ||
const cwd = `${context.root}`; | ||
const projectName = context === null || context === void 0 ? void 0 : context.projectName; | ||
const sourceRoot = (_b = (_a = context === null || context === void 0 ? void 0 : context.workspace) === null || _a === void 0 ? void 0 : _a.projects[projectName]) === null || _b === void 0 ? void 0 : _b.root; | ||
const cwd = `${sourceRoot}`; | ||
const sources = `-v ./...`; | ||
@@ -10,0 +13,0 @@ const cover = options.skipCover ? '' : '-cover'; |
@@ -10,10 +10,14 @@ "use strict"; | ||
const normalizedOptions = (0, utils_1.normalizeOptions)(tree, (0, devkit_1.getWorkspaceLayout)(tree).libsDir, options); | ||
const sourceRoot = normalizedOptions.projectRoot; | ||
(0, devkit_1.addProjectConfiguration)(tree, normalizedOptions.projectName, { | ||
root: normalizedOptions.projectRoot, | ||
root: sourceRoot, | ||
projectType: 'library', | ||
sourceRoot: `${normalizedOptions.projectRoot}/src`, | ||
sourceRoot, | ||
targets: { | ||
build: { | ||
executor: '@nx-go/nx-go:build', | ||
test: { | ||
executor: '@nx-go/nx-go:test', | ||
}, | ||
lint: { | ||
executor: '@nx-go/nx-go:lint', | ||
}, | ||
}, | ||
@@ -20,0 +24,0 @@ tags: normalizedOptions.parsedTags, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
28764
428