Skip to content

Commit 3d859a8

Browse files
committed
simplified compileFile
1 parent 34566ae commit 3d859a8

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

packages/cubejs-schema-compiler/src/compiler/DataSchemaCompiler.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -699,20 +699,7 @@ export class DataSchemaCompiler {
699699

700700
compiledFiles[file.fileName] = true;
701701

702-
if (file.convertedToJs) {
703-
this.compileJsFile(file, errorsReport);
704-
} else if (file.fileName.endsWith('.js')) {
705-
this.compileJsFile(file, errorsReport, { doSyntaxCheck });
706-
} else if (file.fileName.endsWith('.yml.jinja') || file.fileName.endsWith('.yaml.jinja') ||
707-
(file.fileName.endsWith('.yml') || file.fileName.endsWith('.yaml')) &&
708-
file.content.match(JINJA_SYNTAX)
709-
) {
710-
// original jinja/yaml file was already transpiled into js
711-
this.compileJsFile(file, errorsReport);
712-
} else if (file.fileName.endsWith('.yml') || file.fileName.endsWith('.yaml')) {
713-
// original yaml file was already transpiled into js
714-
this.compileJsFile(file, errorsReport);
715-
}
702+
this.compileJsFile(file, errorsReport, { doSyntaxCheck });
716703
}
717704

718705
private getJsScript(file: FileContent): vm.Script {

0 commit comments

Comments
 (0)