Difference between revisions of "Webpack"

From Tweeki
Jump to: navigation, search
Line 3: Line 3:
 
Install node.js – you can follow [https://github.com/nodesource/distributions/blob/master/README.md these instructions] for most linux distributions
 
Install node.js – you can follow [https://github.com/nodesource/distributions/blob/master/README.md these instructions] for most linux distributions
  
Install webpack dependencies
+
Move to Tweeki's directory and install webpack dependencies
  
 +
cd skins/Tweeki/
 
  npm install
 
  npm install
  

Revision as of 09:12, 17 September 2021

Using Webpack to customize the styles

Install node.js – you can follow these instructions for most linux distributions

Move to Tweeki's directory and install webpack dependencies

cd skins/Tweeki/
npm install

Create your customized scripts and styles

mv resources/scripts/example.custom.js resources/scripts/custom.js
mv resources/styles/example.custom.scss resources/styles/custom.scss

Create customized files

npm run prod

Tell MediaWiki to use the custom files with this line in LocalSettings.php

$wgTweekiSkinUseCustomFiles = true;

Every time you change the source files run npm run prod again.