UNPKG

@nxworker/workspace

Version:

Nx plugin providing generators for managing workspace files, including the move-file generator for safely moving files between projects while updating all imports

21 lines (20 loc) 637 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "removeSourceFileExtension", { enumerable: true, get: function() { return removeSourceFileExtension; } }); const _nodepath = require("node:path"); const _fileextensions = require("../constants/file-extensions"); function removeSourceFileExtension(filePath) { const ext = _nodepath.posix.extname(filePath); if (_fileextensions.sourceFileExtensions.includes(ext)) { return filePath.slice(0, -ext.length); } return filePath; } //# sourceMappingURL=remove-source-file-extension.js.map