Support vendoring npm module code
This commit is contained in:
parent
8eb5f093a4
commit
b03c6e9513
@ -78,6 +78,13 @@ The setup task will first delete any existing entries in the directory tree
|
||||
Note that all 389ds data is stored in `tmp/389ds`. So if you want to start over
|
||||
with a fresh installation, delete both that directory as well as the container.
|
||||
|
||||
### Adding npm modules to use with Stimulus controllers
|
||||
|
||||
The following command downloads the specified npm module to `vendor/javascript`
|
||||
and adds an entry for it to `config/importmap.rb`.
|
||||
|
||||
bin/importmap pin bech32 --download
|
||||
|
||||
### Solargraph
|
||||
|
||||
[Solargraph](https://solargraph.org/) is a Ruby language server, which you may
|
||||
@ -98,6 +105,7 @@ command:
|
||||
|
||||
* [Tailwind CSS](https://tailwindcss.com/)
|
||||
* [Sass](https://sass-lang.com/documentation)
|
||||
* [Stimulus](https://stimulus.hotwired.dev/handbook/)
|
||||
|
||||
### Testing
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
//= link_tree ../images
|
||||
//= link_tree ../../javascript .js
|
||||
//= link_tree ../builds
|
||||
//= link_tree ../../../vendor/javascript .js
|
||||
|
4
bin/importmap
Executable file
4
bin/importmap
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require_relative "../config/application"
|
||||
require "importmap/commands"
|
@ -5,3 +5,4 @@ pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
|
||||
pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
|
||||
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
|
||||
pin_all_from "app/javascript/controllers", under: "controllers"
|
||||
pin "bech32" # @2.0.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user