-
Notifications
You must be signed in to change notification settings - Fork 5
Updating Fomantic UI
Anders edited this page Apr 25, 2023
·
3 revisions
NOTE: This is largely based on the instructions in Fomantic-UI's docs, which might have been updated since the time of writing (Fomantic-UI 2.9.2 was the newest version).
- NodeJS >= v12
- NPM >= v6 (this is installed with NodeJS)
- Navigate to the
node
folder:cd node
- Update the Fomantic-UI installation:
Running this command will create a
npm update fomantic-ui
node_modules
folder within thenode
folder, which can optionally be deleted after all these steps are completed. The command will also update thenode/package.json
andnode/package-lock.json
files, which should be committed. - Create the files necessary for building:
The following prompts should now be displayed:
cd node_modules/fomantic-ui npx gulp install
- "It looks like you have a semantic.json file already.
(Use arrow keys)
"- Choose "Yes, extend my current settings."
- "Set-up Fomantic UI
(Use arrow keys)
"- Choose "Automatic (Use default locations and all components)"
- "We detected you are using NPM Nice! Is this your project folder? <repository folder location>/node
(Use arrow keys)
"- Choose "Yes"
- "Where should we put Fomantic UI inside your project?
(semantic/)
"- Press Enter
- "It looks like you have a semantic.json file already.
- Build the CSS and JavaScript files:
This should create a
cd ../../semantic npx gulp build
dist
folder within the currentsemantic
folder (full pathnode/semantic/dist
relative to the repository folder). - The
dist
folder should contain - among other things - two files namedsemantic.min.css
andsemantic.min.js
. Copy the contents of these files to the corresponding files insrc/web/static/lib/fomantic-ui
. Remember to keep/add one blank line at the end of these files, to not mess up the diff! - Overwrite the assets for the
default
theme:- Within
dist/themes/default/assets/fonts
, delete the files whose names begin withLato
(these are not needed, as we use our own font) - Within
src/web/static/lib/fomantic-ui/themes/default
, delete the oldassets
folder - Move the new
assets
folder (dist/themes/default/assets
) tosrc/web/static/lib/fomantic-ui/themes/default
- Within
- Delete the whole
semantic
folder (node/semantic
) and use Git to reset any existing committed files within that folder that have been deleted. If on Windows, also reset any/
characters that have been changed to\\
innode/semantic.json
. - Commit the changes.