UNPKG

@intlayer/core

Version:

Includes core Intlayer functions like translation, dictionary, and utility functions shared across multiple packages.

1 lines 808 B
{"version":3,"file":"fileBrowser.mjs","names":[],"sources":["../../../../src/transpiler/file/fileBrowser.ts"],"sourcesContent":["import { formatNodeType, NodeType } from '@intlayer/types';\nimport type { FileContent } from './file';\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow identify the usage of an external resource.\n *\n * Usage:\n *\n * ```ts\n * file('/path/to/file.md') // absolute path\n *\n * // or\n *\n * file('path/to/file.md') // relative path\n * ```\n */\nexport const file = (path: string): FileContent => {\n throw new Error('file is not available in browser');\n\n return formatNodeType(NodeType.File, path, {\n content: '',\n fixedPath: '',\n });\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAa,QAAQ,SAA8B;AACjD,OAAM,IAAI,MAAM,mCAAmC"}