File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/cubejs-schema-compiler/src/compiler Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -219,9 +219,13 @@ export class DataSchemaCompiler {
219219
220220 // As we mutate files data, we need a copy, not a refs.
221221 // FileContent is a plain object with primitives, so it's enough for a shallow copy.
222- let toCompile = this . filesToCompile ?. length
223- ? files . filter ( f => this . filesToCompile . includes ( f . fileName ) ) . map ( f => ( { ...f } ) )
224- : files . map ( f => ( { ...f } ) ) ;
222+ let toCompile = ( this . filesToCompile ?. length
223+ ? files . filter ( f => this . filesToCompile . includes ( f . fileName ) )
224+ : files ) . filter ( f => f . fileName . endsWith ( '.js' )
225+ // We don't transpile/compile other files (like .py and so on)
226+ || f . fileName . endsWith ( '.yml' )
227+ || f . fileName . endsWith ( '.yaml' )
228+ || f . fileName . endsWith ( '.jinja' ) ) . map ( f => ( { ...f } ) ) ;
225229
226230 const jinjaTemplatedFiles = toCompile . filter ( ( file ) => file . fileName . endsWith ( '.jinja' ) ||
227231 ( file . fileName . endsWith ( '.yml' ) || file . fileName . endsWith ( '.yaml' ) ) && file . content . match ( JINJA_SYNTAX ) ) ;
You can’t perform that action at this time.
0 commit comments