forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-51582 grunt: add less complilation support
Previously we were using recess to build bootstrap base as it was what was used by the original project. But recess is no longer maintained. Now we use grunt for building js, it makes sense to use it for less too. (If you really don't want to use grunt, you almost certainly can just use lessc -x as it uses the same less.js on backend).
- Loading branch information
1 parent
ea5c18d
commit a4a52e5
Showing
5 changed files
with
26 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,16 @@ | ||
About bootstrap in Moodle | ||
------------------------- | ||
If you want to make changes to the .css generated from these .less files then you | ||
need to use a LESS Compiler. Details on specific compilers and how to install them | ||
can be found at http://docs.moodle.org/dev/LESS | ||
|
||
At present, recess is the official tool for developers to compile LESS in to CSS, as | ||
other tools give different results in the generated CSS. | ||
|
||
Once recess has been installed you can compile and compress the LESS in to CSS using | ||
the following commands from the "theme/bootstrapbase/less" directory: | ||
|
||
For the main Moodle styles: | ||
Compiling LESS | ||
-------------- | ||
|
||
recess --compile --compress moodle.less > ../style/moodle.css | ||
|
||
And for the subset of styles of interest to the TinyMCE editor: | ||
|
||
recess --compile --compress editor.less > ../style/editor.css | ||
|
||
You can add --watch to make sure it updates every time you make a change. | ||
If you want to make changes to the .css generated from these .less files then you | ||
need to use a less compiler to build your changes. The supported way to achieve this | ||
is using grunt. | ||
|
||
If the compilation is failing and you're not getting any useful error message, try using lessc instead i.e.: | ||
See https://docs.moodle.org/dev/Grunt for details of how to install grunt. | ||
|
||
lessc moodle.less | ||
Once grunt is installed run the 'less' task: | ||
|
||
This is the same tool that's getting called by recess, but the errors seems better if you go direct. | ||
$ grunt less | ||
|
||
More information | ||
---------------- | ||
Additional information about the Moodle bootstrap base theme can be found at | ||
http://docs.moodle.org/dev/Bootstrap | ||
And the css files will be compiled. | ||
|
||
For further info see: https://docs.moodle.org/dev/LESS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters