Skip to content

Commit bc85966

Browse files
authored
Update README.md
1 parent 8c117fe commit bc85966

File tree

1 file changed

+57
-3
lines changed

1 file changed

+57
-3
lines changed

docs/start/100-installation/README.md

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# Installation guide
1+
# Installation/Update guide
22

3-
This guide shows you how to add the `matestack-ui-core` gem to an existing Rails application.
3+
This guide shows you how to add the `matestack-ui-core` gem to an existing Rails application and update it.
44

55
## Installation
66

77
Add 'matestack-ui-core' to your Gemfile
88

99
```ruby
10-
gem 'matestack-ui-core', '~> 1.2'
10+
gem 'matestack-ui-core', '~> 1.3'
1111
```
1212

1313
and run
@@ -44,3 +44,57 @@ end
4444
Now, you are able to create UI components in pure Ruby and use them in your Rails views. Additionally you can substitute Rails views and layouts with Matestack pages and apps.
4545

4646
If you want to use Matestack's optional reactivity features in pure Ruby (through dynamic Vue.js components such as `form` and `async` or dynamic page transitions), please follow this [guide](/docs/reactive_components/100-rails_integration/) to set up the JavaScript parts via AssetPipeline or Webpacker.
47+
48+
## Update
49+
50+
### Ruby Gem
51+
52+
Depending on the entry in your Gemfile, you might need to adjust the allowed version ranges in order to update the Gem. After checked and adjusted the version ranges, run:
53+
54+
```bash
55+
bundle update matestack-ui-core
56+
```
57+
58+
and then check the installed version:
59+
60+
```bash
61+
bundle info matestack-ui-core
62+
```
63+
64+
### JavaScript via AssetPipeline/Sprockets
65+
66+
If you've installed the JavaScript dependecies via AssetPipeline/Sprockets, updating the Ruby gem is enough! Nothing to do here!
67+
68+
### JavaScript via Yarn
69+
70+
If you've installed the JavaScript dependecies via Yarn/Webpacker you need to update the JavaScript assets manually:
71+
72+
In your package.json, change the version number used in the GitHub path referencing the repo of `matestack-ui-core`. This version number have to match the currently installe version of the Ruby Gem of `matestack-ui-core`
73+
74+
`package.json`
75+
76+
```json
77+
{
78+
"name": "xyz",
79+
"dependencies": {
80+
// adjust the following path in order to match the Ruby Gem version!
81+
"matestack-ui-core": "https://github.com/matestack/matestack-ui-core#v1.3.0",
82+
}
83+
}
84+
85+
```
86+
87+
and then run:
88+
89+
```bash
90+
yarn install
91+
```
92+
93+
and finally check if the correct version is installed:
94+
95+
```bash
96+
yarn list --pattern "matestack-ui-core"
97+
```
98+
99+
100+

0 commit comments

Comments
 (0)