# auto-frontend **Repository Path**: css3/auto-frontend ## Basic Information - **Project Name**: auto-frontend - **Description**: No description available - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2015-01-28 - **Last Updated**: 2020-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 前端自动化工具 ============== 1. less编译为css 2. css Lint 检测 3. css 属性前缀自动补充添加 4. css 属性排序 5. css 压缩mini 6. html w3c 验证 7. zip打包 前提 ---- 需要了解[nodejs](http://www.nodejs.com), [npm](http://www.npmjs.com), [grunt](http://www.gruntjs.com)等相关知识 快速开始 -------- 下载该项目的压缩包 或者 `git clone https://git.oschina.net/css3/auto-frontend.git` 执行 ``` npm install npm install -g grunt-cli ``` 在 src 目录下新建 css js less 目录 less目录下新建style.less文件 style.less 为网站样式文件 如果不使用less,设置`src\project.json`中的less为`false` html页面放入src目录下 使用 -------- 测试 进行编译less 生成csss 验证css文件 验证html文件 ``` grunt test ``` 只处理css ``` grunt dist-css ``` 只进行 html w3c 验证 ``` grunt validation-html ``` 文件监视 自动检测less文件的变化 生成css文件 ``` grunt watch ``` 打包发布 会在dist目录下生成一个html.zip的压缩包 ``` grunt build ```