forked from hotwired/turbo-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dummy app: Depend on
turbo-rails
through importmap (hotwired#231)
* Depend on `importmap-rails` in dummy app When running tests against a dummy Rails application, use [importmap-rails][]. The contents of this commit were generated by following the [Installation][] instructions. [importmap-rails]: https://github.com/rails/importmap-rails/tree/v0.5.1 [Installation]: https://github.com/rails/importmap-rails/tree/v0.5.1#installation * Depend on `turbo-rails` through importmap The contents of this commit were generated by following the [Installation](./README.md#installation) instructions. * Depend on `@rails/actioncable` through importmap Replace the `package.json` development dependency with an importmap entry. * Remove Webpacker JavaScript entrypoints Removes Webpacker-specific helpers from the Application layout in favor of the importmap-generated helpers.
- Loading branch information
1 parent
4e26813
commit 8df11f5
Showing
8 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
//= link_tree ../images | ||
//= link_directory ../stylesheets .css | ||
//= link_tree ../../javascript .js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails | ||
import "@hotwired/turbo-rails" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require_relative "../config/application" | ||
require "importmap/commands" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Use direct uploads for Active Storage (remember to import "@rails/activestorage" in your application.js) | ||
# pin "@rails/activestorage", to: "activestorage.esm.js" | ||
|
||
# Use node modules from a JavaScript CDN by running ./bin/importmap | ||
|
||
pin "application" | ||
pin "@hotwired/turbo-rails", to: "turbo.js" | ||
pin "@rails/actioncable", to: "actioncable.esm.js" |