You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started/installation-update/README.md
+80-82Lines changed: 80 additions & 82 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Make sure to install and get to know `matestack-ui-core` and `matestack-ui-vuejs
10
10
Add 'matestack-ui-bootstrap' to your Gemfile
11
11
12
12
```ruby
13
-
gem 'matestack-ui-bootstrap', "~> 3.0.0.rc2"
13
+
gem 'matestack-ui-bootstrap', "~> 3.1.0"
14
14
```
15
15
16
16
and run
@@ -72,99 +72,114 @@ Don't apply the "matestack-ui" id to the body tag.
72
72
73
73
#### Rails 7 importmap based installation
74
74
75
-
will be shipped in `matestack-ui-bootstrap``3.1`
75
+
{% content-ref url="js-via-importmap.md" %}
76
+
[js-via-importmap.md](js-via-importmap.md)
77
+
{% endcontent-ref %}
76
78
77
79
#### Webpacker > 5.x based JavaScript installation
78
80
79
-
Add 'matestack-ui-vuejs' to your `package.json` by adding:
81
+
{% content-ref url="js-via-webpacker.md" %}
82
+
[js-via-webpacker.md](js-via-webpacker.md)
83
+
{% endcontent-ref %}
80
84
81
-
```
82
-
{
83
-
"name": "my-app",
84
-
"dependencies": {
85
-
"matestack-ui-bootstrap": "^3.0.0-rc2",
86
-
"..."
87
-
}
88
-
}
89
-
```
85
+
#### JSBundling-Rails based installation
90
86
91
-
This adds the npm package that provides the JavaScript corresponding to the matestack-ui-bootstrap Ruby gem. Make sure that the npm package version matches the gem version. To find out what gem version you are using, you may use `bundle info matestack-ui-bootstrap`.
* extract the bootstrap-icons.svg to this path: app/assets/images/icons (currently served via assets pipeline, we had issues not using the asset pipeline)
103
+
104
+
### Stylesheet Setup
105
+
106
+
#### Option 1: Via CDN (CSS only)
107
+
108
+
{% hint style="info" %}
109
+
This option makes sense if you're using the importmap approach for the JS setup and are looking for a minimal setup in order to pull in the required styles. You cannot use SCSS features though.
(don't forget to restart webpacker when changing this file!)
162
+
Even if you use the importmap approach, this package.json will install the JavaScript packages into the node\_modules folder. They will not be used when following the importmap approach. Only the SCSS files will be used in this case.
156
163
157
-
and then finally compile the JavaScript code with webpack:
164
+
And finally add the `matestack-ui-bootstrap.css` file to your layout via CDN. Alternatively you can download this file and let it be served via Sprockets.
Use this option if you have installed the JavaScript packages via JSBundling-Rails and want to use SCSS features like Bootstrap theming
165
176
{% endhint %}
166
177
167
-
### Stylesheet/Icon setup
178
+
#### Option 3: Via Webpacker (SCSS)
179
+
180
+
{% hint style="info" %}
181
+
Use this option if you have installed the JavaScript packages via Webpacker as well in order to be able to use SCSS features like Bootstrap theming
182
+
{% endhint %}
168
183
169
184
Tell Webpack to import Bootstraps CSS:
170
185
@@ -174,35 +189,18 @@ Tell Webpack to import Bootstraps CSS:
174
189
@import"~bootstrap/scss/bootstrap.scss";
175
190
```
176
191
177
-
Import the required JS libraries and mount MatestackUiCore and MatestackUiBootstrap properly. We recommend to remove Turbolinks, as it might interfere with some of the reactivity feature of Matestack:
178
-
179
192
`app/javascript/packs/application.js`
180
193
181
194
```javascript
182
195
import"./stylesheets/application.scss"; // add this
* extract the bootstrap-icons.svg to this path: app/assets/images/icons (currently served via assets pipeline, we had issues serving the icons via Webpack)
description: shipped in matestack-ui-bootstrap 3.1
3
+
---
4
+
5
+
# JS via Importmap
6
+
7
+
Please follow the importmap install guide for `matestack-ui-vuejs` first: [https://docs.matestack.io/matestack-ui-vuejs/getting-started/installation-update/importmap-install-steps](https://docs.matestack.io/matestack-ui-vuejs/getting-started/installation-update/importmap-install-steps)
This package.json will install all the JavaScript packages pinned via importmap config into the node\_modules folder. We just use the scss parts of it. Alternativel to the `importmap` approach, you could use `jsbundling-rails`
0 commit comments