mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add installation instructions for importmap-rails
This commit is contained in:
parent
889c87773c
commit
6a674db689
1 changed files with 14 additions and 0 deletions
|
@ -32,6 +32,20 @@ manage your JavaScript dependencies, there is no need to install Node.js or Yarn
|
||||||
When using import maps, no separate build process is required, just start your server with
|
When using import maps, no separate build process is required, just start your server with
|
||||||
`bin/rails server` and you are good to go.
|
`bin/rails server` and you are good to go.
|
||||||
|
|
||||||
|
### Installing importmap-rails
|
||||||
|
|
||||||
|
Importmap for Rails is automatically included in Rails 7+ for new applications, but you can also install it manually in existing applications:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ bin/bundle add importmap-rails
|
||||||
|
```
|
||||||
|
|
||||||
|
Run the install task:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ bin/rails importmap:install
|
||||||
|
```
|
||||||
|
|
||||||
### Adding NPM Packages with importmap-rails
|
### Adding NPM Packages with importmap-rails
|
||||||
|
|
||||||
To add new packages to your import map-powered application, run the `bin/importmap pin` command
|
To add new packages to your import map-powered application, run the `bin/importmap pin` command
|
||||||
|
|
Loading…
Reference in a new issue