⒌ Less 编译

hzlzh edited this page Jul 26, 2016 · 3 revisions

我们团队使用 Less 作为主要开发语言,目前 Sass 也已经支持。

以提供的项目示例代码为例:

── src
   ├── css
       ├── header.less
       ├── lib-mixins.less
       ├── lib-reset.less
       ├── style-index.less
       └── tips.less

style-index.less

/**
 * @name: Test Project
 * @description: This is a demo use of `Gulp Workflow`
 * @author: littledu
 */

/* Import Less files */

@import "lib-mixins";
@import "lib-reset";

/* Import modules like `header.less` */

@import "header";
@import "tips";

style-*.less 为样式的出口文件,程序只编译 style- 开头的 Less 文件,其他的文件都可以认为是一个个模块,import 在出口文件里面,如 header 模块。

OVER!!!

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.