Overview
30 Second Explanation
Download Semantic UI navigate to the install folder then run a gulp command.
To build all files:
To watch for changes
Why Build Tools?
Semantic UI uses Gulp for several reasons:
Folder Structure
A Semantic UI project includes the following folder structure.
Gulp Commands
Below is a list of all available gulp commands
Command | Description |
---|---|
install | Asks install questions to setup semantic.json |
watch (default) | Watches for changes in source files, and builds file on change |
build | Build all files |
clean | Cleans dist/ folder |
version | Outputs current version |
build-javascript | Build JS files |
build-css | Build CSS files |
build-assets | Build assets files |
serve-docs | Serves files to local docs instance |
build-docs | Builds files to docs folder |
Configuration Files
semantic.json
Build tool settings are stored in a special file called semantic.json
It can be included in any folder that is in a parent folder of the semantic install folder.
If you used the npm or meteor, a semantic.json
file is automatically generated for you in the root of your project. If you used a different package manager you can run gulp install
to run the interactive installer.
theme.config
LESS uses a special configuration file theme.config
which lets you specify what theme each component should use. If you have not generated this file yet, you will receive an error message when running build tools
You can learn more about theme.config
by checking out the theming guide
Importing Gulp Tasks
See our recipes section for examples on how to import individual gulp tasks into your custom Gulpfile.
Auto-Install & Continuous Integration
New in 2.2
We've added a new setting to semantic.json
in 2.2 to help make working with a CLI, or other automated deployments more streamlined.
Specifying autoInstall: true
in an environments semantic.json
configuration will prevent any user prompting when running npm install
allowing for automated deployment.