Skip to content

Commit

Permalink
Add ts files when searching for main js file in the app
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan committed Oct 3, 2024
1 parent e9bb15b commit 2d7d81b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Clearly define files included in gem
* Fix Middleware and Middleware generator bugs [#316](https://github.com/railsware/js-routes/issue/316)
* Remove empty object linter warning on DTS module
* Generators: Add `.ts` extension when searching for main JS file of the project

## v2.2.9

Expand Down
2 changes: 2 additions & 0 deletions lib/js_routes/generators/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ def self.inherited(subclass)

def application_js_path
[
"app/javascript/packs/application.ts",
"app/javascript/packs/application.js",
"app/javascript/controllers/application.ts",
"app/javascript/controllers/application.js",
].find do |path|
File.exist?(Rails.root.join(path))
Expand Down

0 comments on commit 2d7d81b

Please sign in to comment.