download file
You can download the packaged files directly from the MDUI official website, which contains compressed and uncompressed CSS and JavaScript files, as well as Roboto font files and Material Icons icon files.
打开 MDUI 官网
CDN
cdnjs (The speed of foreign visits is faster)
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/mdui/0.4.3/css/mdui.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/mdui/0.4.3/js/mdui.min.js"></script>
css.net (Domestic access speed is faster)
<link rel="stylesheet" href="//cdnjs.loli.net/ajax/libs/mdui/0.4.3/css/mdui.min.css">
<script src="//cdnjs.loli.net/ajax/libs/mdui/0.4.3/js/mdui.min.js"></script>
Bower
Execute the following command to install MDUI:
bower install mdui
NPM
Execute the following command to install MDUI:
npm install mdui
Custom build
MDUI use Gulp Build. From Github After obtaining the source code, you can execute the following gulp command to build.
command |
Description |
gulp version |
Output current version number |
gulp watch |
Execute packaging commands when the source code is modified |
gulp build-css |
Package the CSS file, the packaged file is located in dist/css/ In the catalog |
gulp build-js |
Package the JavaScript file, the packaged file is located in dist/js/ In the catalog |
gulp build |
Package all files, the packaged files are located in dist/ In the catalog |
gulp clean-css |
Empty dist/css/ CSS files in the directory |
gulp clean-js |
Empty dist/js/ JavaScript files in the directory |
gulp custom |
For custom packaging, the packaged file is located in custom/ Directory. The command needs to include parameters, which are described as follows:
gulp custom
-modules:use“,”Delimited module name
-primary-colors:use“,”Separated primary color name
-accent-colors:use“,”Separate accent color names
-color-degrees:use“,”Separate color saturation
-layout-dark
|
gulp clean-custom |
Empty custom/ All files in the directory |