(refactor) rename constants
This commit is contained in:
		| @@ -4,15 +4,15 @@ import { ParserInterface } from './parser.interface'; | |||||||
| import { TranslationCollection } from '../utils/translation.collection'; | import { TranslationCollection } from '../utils/translation.collection'; | ||||||
| import { getNamedImportAlias, findFunctionCallExpressions, getStringsFromExpression } from '../utils/ast-helpers'; | import { getNamedImportAlias, findFunctionCallExpressions, getStringsFromExpression } from '../utils/ast-helpers'; | ||||||
|  |  | ||||||
| const MARKER_PACKAGE_MODULE_NAME = '@biesbjerg/ngx-translate-extract-marker'; | const MARKER_MODULE_NAME = '@biesbjerg/ngx-translate-extract-marker'; | ||||||
| const MARKER_PACKAGE_IMPORT_NAME = 'marker'; | const MARKER_IMPORT_NAME = 'marker'; | ||||||
|  |  | ||||||
| export class MarkerParser implements ParserInterface { | export class MarkerParser implements ParserInterface { | ||||||
|  |  | ||||||
| 	public extract(contents: string, filePath: string): TranslationCollection | null { | 	public extract(contents: string, filePath: string): TranslationCollection | null { | ||||||
| 		const sourceFile = tsquery.ast(contents, filePath); | 		const sourceFile = tsquery.ast(contents, filePath); | ||||||
|  |  | ||||||
| 		const markerImportName = getNamedImportAlias(sourceFile, MARKER_PACKAGE_MODULE_NAME, MARKER_PACKAGE_IMPORT_NAME); | 		const markerImportName = getNamedImportAlias(sourceFile, MARKER_MODULE_NAME, MARKER_IMPORT_NAME); | ||||||
| 		if (!markerImportName) { | 		if (!markerImportName) { | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user