(refactor) rename constants
This commit is contained in:
parent
16bf5f59e0
commit
7bf0c138b8
@ -4,15 +4,15 @@ import { ParserInterface } from './parser.interface';
|
||||
import { TranslationCollection } from '../utils/translation.collection';
|
||||
import { getNamedImportAlias, findFunctionCallExpressions, getStringsFromExpression } from '../utils/ast-helpers';
|
||||
|
||||
const MARKER_PACKAGE_MODULE_NAME = '@biesbjerg/ngx-translate-extract-marker';
|
||||
const MARKER_PACKAGE_IMPORT_NAME = 'marker';
|
||||
const MARKER_MODULE_NAME = '@biesbjerg/ngx-translate-extract-marker';
|
||||
const MARKER_IMPORT_NAME = 'marker';
|
||||
|
||||
export class MarkerParser implements ParserInterface {
|
||||
|
||||
public extract(contents: string, filePath: string): TranslationCollection | null {
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user