Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

golem::add_js_file() should not duplicate file extension #231

Closed
gadenbuie opened this issue Oct 15, 2019 · 2 comments
Closed

golem::add_js_file() should not duplicate file extension #231

gadenbuie opened this issue Oct 15, 2019 · 2 comments

Comments

@gadenbuie
Copy link

A minor issue: golem::add_js_file() will add an extra .js if one already exists on the input name.

golem::add_js_file("test.js")
✔ File created at /Users/garrick/golemDemo/inst/app/www/test.js.js

I was expecting it to work like usethis::use_r()

use_r("test.R")
● Modify 'R/test.R'
@ColinFay
Copy link
Member

That definitely shouldn't happen.

I think wrapping the file name in tools::file_path_sans_ext() would solve that.

We might have the same thing happening with the other file creators.

I will give it a shot, thanks for reporting that!

@ColinFay
Copy link
Member

Close by #236.

Thanks for the bug report !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants