Sha256: 534c70f63f275cb30cf2c8a64ceec22e981ad1c59ca81d206cea5d6313d7245a

Contents?: true

Size: 1.29 KB

Versions: 26

Compression:

Stored size: 1.29 KB

Contents

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.build = exports.joinDirectoryPath = exports.joinPathWithBasePath = void 0;
const path_1 = require("path");
const utils_1 = require("../../utils");
function joinPathWithBasePath(filename, directoryPath) {
    return directoryPath + filename;
}
exports.joinPathWithBasePath = joinPathWithBasePath;
function joinPathWithRelativePath(root, options) {
    return function (filename, directoryPath) {
        const sameRoot = directoryPath.startsWith(root);
        if (sameRoot)
            return directoryPath.replace(root, "") + filename;
        else
            return ((0, utils_1.convertSlashes)((0, path_1.relative)(root, directoryPath), options.pathSeparator) +
                options.pathSeparator +
                filename);
    };
}
function joinPath(filename) {
    return filename;
}
function joinDirectoryPath(filename, directoryPath, separator) {
    return directoryPath + filename + separator;
}
exports.joinDirectoryPath = joinDirectoryPath;
function build(root, options) {
    const { relativePaths, includeBasePath } = options;
    return relativePaths && root
        ? joinPathWithRelativePath(root, options)
        : includeBasePath
            ? joinPathWithBasePath
            : joinPath;
}
exports.build = build;

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
clapton-0.0.26 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.22 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.21 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.20 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.19 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.18 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.17 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.16 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.15 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.14 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.13 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.12 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.11 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.10 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.9 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.8 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js
clapton-0.0.7 lib/clapton/javascripts/node_modules/fdir/dist/api/functions/join-path.js