We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49b61f9 commit e36ccc4Copy full SHA for e36ccc4
create_import_list.js
@@ -29,12 +29,14 @@ const createImportStatement = async name => {
29
return named
30
}
31
32
-const modelFiles = await fs.promises.readdir('./lib/model')
+const modelFiles = await fs.promises.readdir('./lib/model', { withFileTypes: true })
33
const modelNames = []
34
35
for (const modelName of modelFiles) {
36
- const named = await createImportStatement(`model/${modelName}`)
37
- modelNames.push(...named)
+ if (modelName.isFile() && modelName.name.endsWith('.js')) {
+ const named = await createImportStatement(`model/${modelName.name}`)
38
+ modelNames.push(...named)
39
+ }
40
41
42
const rlFiles = await fs.promises.readdir('./lib/rl')
0 commit comments