Merge branch 'MDL-59303' of https://github.com/paulholden/moodle
[moodle.git] / theme / boost / readme_moodle.txt
blob78e65cf44d810305dd34e81cc43d462b1b4fde2e
1 Description of Twitter bootstrap import into Moodle
3 Twitter bootstrap
4 -----------------
6 Sass:
7 This theme uses the version 4.3.1 Twitter bootstrap sass files.
8 The bootstrap repository is available on:
10 https://github.com/twitter/bootstrap.git
12 To update to the latest release of twitter bootstrap:
14 * remove all files from scss/bootstrap,
15 * download the new scss files and store them in scss/bootstrap
16 * remove left: 0; from .popover {} in scss/bootstrap/_popover.scss. In RTL mode this prevents popovers from showing and it is not required in LTR mode.
17 * update ./thirdpartylibs.xml
19 Javascript:
21 This theme uses the transpiled javascript from bootstrap4 as amd modules.
23 To update the javascript files:
24 Checkout the version you are updating to in a folder, Run the follwing inside the cloned Bootstrap repository:
26 ```
27 $ npm install @babel/cli@7.0.0-beta.41 @babel/preset-env@7.0.0-beta.41 babel-plugin-transform-es2015-modules-amd @babel/plugin-proposal-object-rest-spread
28 $ mkdir out
29 $ ./node_modules/@babel/cli/bin/babel.js --presets @babel/preset-env --plugins transform-es2015-modules-amd,@babel/plugin-proposal-object-rest-spread -d ./out/ js/src/
30 ```
32 Copy the transpiled files from out/ into the amd/src/ folder for the theme.
34 Moodle core includes the popper.js Library, so make sure each of the new js files references the "core/popper" library instead of "popper.js".
35 For version 4.3.1 these files were: tooltip.js and dropdown.js
37 Move the amd/src/tools/sanatizer.js to amd/src/sanatizer.js and update libraries including sanatizer.js.
38 For version 4.3.1 this file was: tooltip.js
40 Run grunt to re-compile the JS files. (thanks to Joby Harding)