Skip to content

Commit

Permalink
Keep full filenames when filename includes whitespaces or digits (#209)
Browse files Browse the repository at this point in the history
* Keep full filenames when filename includes whitespaces or digits

* Revert yarn.lock
  • Loading branch information
willkrakow committed Dec 21, 2023
1 parent fed85b7 commit 85079c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli.js
Expand Up @@ -81,7 +81,7 @@ if (cli.input.length === 0) {
Command: npx gltfjsx@${packageJson.version} ${process.argv.slice(2).join(' ')}`,
}
const file = cli.input[0]
let nameExt = file.match(/[-_\w]+[.][\w]+$/i)[0]
let nameExt = file.match(/[-_\w\d\s]+[.][\w]+$/i)[0]
let name = nameExt.split('.').slice(0, -1).join('.')
const output = config.output ?? name.charAt(0).toUpperCase() + name.slice(1) + (config.types ? '.tsx' : '.jsx')
const showLog = (log) => {
Expand Down

0 comments on commit 85079c7

Please sign in to comment.