UNPKG

@zohodesk/client_build_tool

Version:

A CLI tool to build web applications and client libraries

22 lines (16 loc) 537 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addHashToFilePath = addHashToFilePath; var _path = _interopRequireDefault(require("path")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function addHashToFilePath(filePath, hash) { const pathObj = _path.default.parse(filePath); const updatedFilePath = _path.default.format({ dir: pathObj.dir, name: `${pathObj.name}.${hash}`, ext: pathObj.ext }); return updatedFilePath; }