Skip to content

Commit 3a79450

Browse files
committed
Improve the instructions regarding composer usage
1 parent dccfa8d commit 3a79450

File tree

1 file changed

+56
-9
lines changed

1 file changed

+56
-9
lines changed

README.md

Lines changed: 56 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,64 @@ You can install the theme using any of the methods below.
1111
Add the following lines in the `composer.json` file that is located in your
1212
SimpleSAMLphp installation:
1313
```
14+
"require": {
15+
16+
...
17+
18+
"rciam/simplesamlphp-module-themevanilla": "1.0.0",
19+
"rciam/css": "1.0.0",
20+
"rciam/js": "1.0.0"
21+
},
1422
"repositories": [
23+
24+
...
25+
1526
{
1627
"type": "vcs",
1728
"url": "https://github.com/rciam/simplesamlphp-module-themevanilla"
29+
},
30+
{
31+
"type": "package",
32+
"package": {
33+
"name": "rciam/css",
34+
"version": "1.0.0",
35+
"dist": {
36+
"type": "zip",
37+
"url": "<zip file url>"
38+
}
39+
}
40+
},
41+
{
42+
"type": "package",
43+
"package": {
44+
"name": "rciam/js",
45+
"version": "1.0.0",
46+
"dist": {
47+
"type": "zip",
48+
"url": "<zip file url>"
49+
}
50+
}
1851
}
19-
]
52+
],
53+
"scripts": {
54+
55+
...
56+
57+
"post-update-cmd": [
58+
"cp -r 'vendor/rciam/css' 'modules/themevanilla/www/resources'",
59+
"cp -r 'vendor/rciam/js' 'modules/themevanilla/www/resources'"
60+
]
61+
},
2062
```
21-
Note that composer will include in the module the css files or the minified
22-
javascript files.
23-
You'll need to download or produce them. You can download the compressed directories
24-
from the [release page](https://github.com/rciam/simplesamlphp-module-themevanilla/releases).
25-
If you want to produce them, you may read the customisation instructions below.
63+
64+
With the above configuration composer will do several operations:
65+
- It will put the module `themevanilla` in the `modules` directory.
66+
- It will download and extract the compressed `css` and `js` directories that
67+
include the minified css and javascript files.
68+
- It will copy the `css` and `js` directories from the `vendor/rciam` directory
69+
in the `themevanilla/www/resources` directory, where the static files of the
70+
theme should be placed.
71+
2672

2773
### Direct download
2874

@@ -40,9 +86,10 @@ git clone https://github.com/rciam/simplesamlphp-module-themevanilla.git themeva
4086
```
4187
Note that the cloned repository will not include the css files or minified
4288
javascript files.
43-
You'll need to download or produce them. You can download the compressed directories (`js.zip` and `css.zip`)
44-
from the [release page](https://github.com/rciam/simplesamlphp-module-themevanilla/releases) and extract them under `modules/themevanilla/www/resources`.
45-
If you want to produce them, you may read the customisation instructions below.
89+
You'll need to download or produce them. You can download the compressed
90+
directories (`js.zip` and `css.zip`) from the [release page](https://github.com/rciam/simplesamlphp-module-themevanilla/releases) and
91+
extract them under `modules/themevanilla/www/resources`. If you want to produce
92+
them, you may read the customisation instructions below.
4693

4794
---
4895

0 commit comments

Comments
 (0)