2016-07-15 17:02:22 +08:00
|
|
|
Description of Twitter bootstrap import into Moodle
|
|
|
|
|
|
|
|
Twitter bootstrap
|
|
|
|
-----------------
|
2016-07-25 16:22:00 +08:00
|
|
|
|
|
|
|
Sass:
|
2018-04-17 15:13:31 +02:00
|
|
|
This theme uses the original unmodified version 4.0.0 Twitter bootstrap sass files.
|
2016-07-15 17:02:22 +08:00
|
|
|
The bootstrap repository is available on:
|
|
|
|
|
|
|
|
https://github.com/twitter/bootstrap.git
|
|
|
|
|
|
|
|
To update to the latest release of twitter bootstrap:
|
2016-11-17 10:04:48 +08:00
|
|
|
* re-apply /* rtl:begin:ignore */ on the top of _popover.scss before .popover rule and /* rtl:end:ignore */ before
|
|
|
|
.popover-arrow::after rule. See MDL-56763 commit (1a4faf9b).
|
2016-07-15 17:02:22 +08:00
|
|
|
* remove all files from scss/bootstrap,
|
|
|
|
* download the new scss files and store them in scss/bootstrap
|
|
|
|
* update ./thirdpartylibs.xml
|
|
|
|
|
2016-07-25 16:22:00 +08:00
|
|
|
Javascript:
|
|
|
|
|
|
|
|
This theme uses the transpiled javascript from bootstrap4 as amd modules.
|
|
|
|
|
|
|
|
To update the javascript files:
|
2018-04-17 15:13:31 +02:00
|
|
|
Checkout the latest branch of bootstrap to a folder, Run the follwing inside the cloned Bootstrap repository:
|
2016-07-25 16:22:00 +08:00
|
|
|
|
2018-04-17 15:13:31 +02:00
|
|
|
```
|
|
|
|
$ npm install @babel/cli@7.0.0-beta.37 @babel/preset-env@7.0.0-beta.37 babel-plugin-transform-es2015-modules-amd @babel/plugin-proposal-object-rest-spread
|
|
|
|
$ mkdir out
|
|
|
|
$ ./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/
|
|
|
|
```
|
2016-07-25 16:22:00 +08:00
|
|
|
|
|
|
|
Copy the transpiled files from out/ into the amd/src/ folder for the theme.
|
2018-04-17 15:13:31 +02:00
|
|
|
Run grunt to re-compile the JS files. (thanks to Joby Harding)
|