bin/rails importmap:install

This commit is contained in:
cryptogopher 2023-04-01 23:53:05 +02:00
parent 0e72219373
commit 526c285188
6 changed files with 11 additions and 0 deletions

View File

@ -1,2 +1,4 @@
//= link_tree ../images //= link_tree ../images
//= link_directory ../stylesheets .css //= link_directory ../stylesheets .css
//= link_tree ../../javascript .js
//= link_tree ../../../vendor/javascript .js

View File

@ -0,0 +1 @@
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails

View File

@ -7,6 +7,7 @@
<%= csp_meta_tag %> <%= csp_meta_tag %>
<%= stylesheet_link_tag "application" %> <%= stylesheet_link_tag "application" %>
<%= javascript_importmap_tags %>
</head> </head>
<body> <body>

4
bin/importmap Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env ruby
require_relative "../config/application"
require "importmap/commands"

3
config/importmap.rb Normal file
View File

@ -0,0 +1,3 @@
# Pin npm packages by running ./bin/importmap
pin "application", preload: true

0
vendor/javascript/.keep vendored Normal file
View File