Skip to content

Commit b91047d

Browse files
committed
First commit
0 parents  commit b91047d

17 files changed

+31419
-0
lines changed

.vscode/fsconfig.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"configs":
3+
[
4+
{
5+
"name":"sync-files",
6+
"enabled":true,
7+
"sync":
8+
[
9+
{
10+
"src":"ABSOLUTE PATH TO/media/templates/site/cassiopeia_child",
11+
"dest":"ABSOLUTE PATH TO/templates/cassiopeia_child/media",
12+
"bidir":true
13+
}
14+
]
15+
}
16+
]
17+
}

.vscode/settings.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"liveSassCompile.settings.formats":[
3+
{
4+
"format": "compressed",
5+
"extensionName": ".min.css",
6+
"savePath": "/media/templates/site/cassiopeia_child/css"
7+
},
8+
{
9+
"format": "expanded",
10+
"extensionName": ".css",
11+
"savePath": "/media/templates/site/cassiopeia_child/css"
12+
}
13+
],
14+
"liveSassCompile.settings.generateMap": true,
15+
"liveSassCompile.settings.includeItems": [
16+
"/media/templates/site/cassiopeia_child/scss/template.scss",
17+
"/media/templates/site/cassiopeia_child/scss/template-rtl.scss"
18+
]
19+
}

README.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Setup VScode for Child theme SCSS compiling
2+
3+
## Creating the child theme
4+
In my example I've created a Joomla child theme with the name of "child". The name of the new theme is "cassiopeia_child"
5+
6+
## Setup VScode
7+
Install the SCSS compiler extension in VScode: https://marketplace.visualstudio.com/items?itemName=glenn2223.live-sass
8+
9+
To make maintance easy I automatically copy the folders and files from **media/templates/site/cassiopeia_child** to **templates/cassiopeia_child/media** folder. That way the template is installable. Also maintaining a git repo is easier as all the files are in one folder.
10+
11+
To copy the files automatically I use the extension FileSync:
12+
https://marketplace.visualstudio.com/items?itemName=pgmjah.filesync (example configuration files is present in the .vscode folder)
13+
14+
Note: the files are only copied. When working on SCSS files use the **media/templates/site/cassiopeia_child/scss** folder.
15+
16+
## Setup the development environment
17+
- Install Joomla on your local server
18+
- download and install the repo. The child theme is now installed.
19+
- Move the .vscode folder to the Joomla root
20+
- To make the FileSync work, change the paths in the fsconfig.json to the absolute paths to the **media/templates/site/cassiopeia_child** and **templates/cassiopeia_child/media** folder.
21+
22+
## Override the bootstrap variables
23+
I've created the two example files (template.scss / template-rtl.scss) which are needed to compile the template.css with custom bootstrap variables.
24+
25+
To start compiling the CSS just click the "Watch Sass" button on the bottom right of VScode. As soon as the template.scss or template-rtl.scss is changes the css files are created.
26+
27+
## Good to know:
28+
- Make sure all the folder in the templates media folder are not empty. I used .keep files for that. This will also add the empty folders to a git repo.
29+
- The template-rtl.scss is only compiled when you start the Sass watcher or when the template-rtl.scss is saved. When the site goes to production, make sure you template-rtl.scss is create (Just save the file once or turn the compiler on and off again)
30+
- I've made some small modifications to the templateDetails.xml. I added the .vscode folder to the installation.

0 commit comments

Comments
 (0)