UNPKG

@frontitude/cli

Version:

The Frontitude CLI enables product teams to integrate their code with Frontitude (frontitude.com), thus creating a single source of truth for their product copy, from design to development.

22 lines (21 loc) 1.33 kB
/// <reference types="node" /> import * as fs from 'fs'; export declare const readFile: typeof fs.readFile.__promisify__; export declare const writeFile: typeof fs.writeFile.__promisify__; export declare const idDirectoryExists: (path: string) => Promise<unknown>; export declare const isPathOrFileExists: (path: string) => boolean; export declare const writeToFile: (path: string, data: object) => Promise<void>; export declare const readFileByPath: (path: string) => Promise<any>; export declare const createDirectoryRecursively: (dirPath: string) => Promise<void>; export declare const createFileIfNotExist: (filePath: string) => Promise<void>; /** * * @returns {Object} fileDetails * @returns {string} fileDetails.fileExtension Full file extension (e.g. .json) * @returns {string} fileDetails.fileType Lowercased type (e.g. json) * @returns {string} fileDetails.fileNameWithoutExtension Just the name, without the extension * @returns {string} fileDetails.fileDirPath The whole dir path, excluding the file name */ export declare const getFileDetails: (fileFullPath?: string) => StringsFileDetails; export declare const normalizeFilePath: (filePath?: string) => string; export declare const getTargetLanguageFilePath: (filePath: string, fileDetails: StringsFileDetails, localeId: string) => string;