Flat UI Free Deployment and Usage Guide
Prerequisites
Before getting started with Flat UI Free, ensure you have the following installed:
- Node.js (version 10 or higher) - Required for running npm scripts and Gulp tasks
- npm (comes with Node.js) - Package manager for installing dependencies
- Git - For cloning the repository
- Bower (optional) - Package manager for web packages (if you prefer Bower over npm)
Installation
Follow these steps to install Flat UI Free:
-
Clone the repository:
git clone https://github.com/designmodo/Flat-UI.git cd Flat-UI -
Install dependencies:
npm install bower install -
Verify installation: The project structure should include:
app/- Source files (SCSS, JavaScript, etc.)dist/- Compiled and minified CSS/JS filesdocs/- Documentation and examples
Configuration
Flat UI Free doesn't require any environment variables or API keys. However, you may want to customize the following:
-
SCSS Variables: Modify
_variables.scssinapp/styles/to customize colors, typography, and other design elements. -
Build Configuration: The Gulpfile.js contains build tasks. You can modify the
devvariable to control whether sourcemaps are generated during development. -
BrowserSync: The Gulpfile uses BrowserSync for live reloading. You can configure the server settings in the
browserSyncconfiguration.
Build & Run
Development
-
Start development server:
gulp serveThis will:
- Compile SCSS files to CSS
- Start a local development server
- Enable live reloading when files change
-
Watch for changes: The
gulp servetask automatically watches for changes in SCSS and JavaScript files and recompiles them.
Production
-
Build for production:
gulp buildThis will:
- Compile and minify SCSS files
- Minify JavaScript files
- Optimize images
- Output to the
dist/folder
-
Run production build:
gulp serve:distThis serves the production-ready files from the
dist/folder.
Deployment
Flat UI Free is a front-end framework, so it can be deployed to any static hosting service. Here are some recommended options:
GitHub Pages
-
Build the project for production:
gulp build -
Deploy the
dist/folder to GitHub Pages:- Create a new repository on GitHub
- Initialize a git repository in the
dist/folder - Commit and push to GitHub
- Enable GitHub Pages in the repository settings
Netlify
- Connect your repository to Netlify
- Set the build command to
gulp build - Set the publish directory to
dist/ - Deploy
Vercel
- Connect your repository to Vercel
- Set the build command to
gulp build - Set the output directory to
dist/ - Deploy
Troubleshooting
Common Issues and Solutions
-
SCSS Compilation Errors:
- Ensure you have the latest version of Node.js and npm
- Check that all dependencies are installed:
npm install - Verify that your SCSS syntax is correct
-
JavaScript Errors:
- Make sure jQuery is loaded before Flat UI JavaScript files
- Check that the
application.jsfile is properly included - Verify that all required dependencies (like Bootstrap) are loaded
-
Build Failures:
- Run
npm cache clean --forceand reinstall dependencies - Check for any missing files in the
app/directory - Ensure you have sufficient disk space
- Run
-
Live Reload Not Working:
- Check that BrowserSync is running:
gulp serve - Verify that your browser allows connections to localhost
- Check the console for any JavaScript errors
- Check that BrowserSync is running:
-
Missing Fonts/Icons:
- Ensure the
fonts/directory is included in your deployment - Check that the font paths in CSS are correct
- Verify that the font files are not corrupted
- Ensure the
-
Responsive Design Issues:
- Test on different screen sizes
- Check that the viewport meta tag is included in your HTML
- Verify that Bootstrap's responsive utilities are properly loaded
Getting Help
- Documentation: Visit the Flat UI Documentation
- Issues: Report issues on the GitHub Issues page
- Community: Check the Designmodo Community for support and discussions