Lines Matching refs:filePath
63 export function getOhmUrlByFilepath(filePath: string, projectConfig: any, logger: any, namespace?: …
65 if (filePath.startsWith('\x00')) {
66 filePath = filePath.replace('\x00', '');
68 let unixFilePath: string = toUnixPath(filePath);
69 unixFilePath = unixFilePath.substring(0, filePath.lastIndexOf('.')); // remove extension
118 …logger.error(red, `ArkTS:ERROR Failed to get an resolved OhmUrl by filepath "${filePath}"`, reset);
119 return filePath;
145 …logger.error(red, `ArkTS:ERROR Failed to get an resolved OhmUrl by filepath "${filePath}"`, reset);
146 return filePath;
188 …const filePath: string = genTemporaryPath(sourcePath, projectConfig.projectPath, process.env.cache… constant
189 if (filePath.length === 0) {
192 mkdirsSync(path.dirname(filePath));
196 fs.writeFileSync(filePath, sourceCode);
199 writeMinimizedSourceCode(sourceCode, filePath, logger);
202 fs.writeFileSync(filePath, sourceCode);
265 const filePath: string = absolutePath + getExtensionIfUnfullySpecifiedFilepath(absolutePath); constant
266 if (fs.existsSync(filePath) && fs.statSync(filePath).isFile()) {
288 const filePath: string = constant
291 filePath.match(/(\S+)(\/|\\)src(\/|\\)(?:main|ohosTest)(\/|\\)(ets|js)(\/|\\)(\S+)/);
309 export async function writeMinimizedSourceCode(content: string, filePath: string, logger: any,
343 fs.writeFileSync(filePath, result.code);
346 export function genBuildPath(filePath: string, projectPath: string, buildPath: string, projectConfi…
347 filePath = toUnixPath(filePath);
348 if (filePath.endsWith(EXTNAME_MJS)) {
349 filePath = filePath.replace(/\.mjs$/, EXTNAME_JS);
351 if (filePath.endsWith(EXTNAME_CJS)) {
352 filePath = filePath.replace(/\.cjs$/, EXTNAME_JS);
356 if (isPackageModulesFile(filePath, projectConfig)) {
360 if (filePath.indexOf(fakePkgModulesPath) === -1) {
362 const tempFilePath: string = filePath.replace(hapPath, '');
366 output = filePath.replace(fakePkgModulesPath, path.join(projectConfig.nodeModulesPath, ONE));
371 if (filePath.indexOf(projectPath) !== -1) {
372 const sufStr: string = filePath.replace(projectPath, '');