Skip to content

Serve命令执行到styles后退出,无报错 #83

@SmileSmith

Description

@SmileSmith

问题描述

执行ath s后,log最后如下:

[14:14:11] 开始tuan模块任务styles!
[14:14:12] gulp-postcss: buy.css

然后无错误退出,在其它机器上正常使用

环境

node: 10.3.0 (nvm管理)
npm:6.1.0
athena-html:1.4.14

定位

  1. 打日志发现是lib/build/task/styles.js文件第69行代码
    把自定义包装pipe的代码去掉后,正常使用

.pipe($.if(isServe, athenaMate.plumber())) // 删除这行正常,进一步排查这个函数

  1. 这个函数的作用是返回包装后的through2.obj();
    对应文件是lib/build/athena_mate/athena_plumber.js
    删除第66行代码后正常,具体见下方评论。

疑问

我的疑问是在93行中,每次执行pipe2的时候已经会重新patchPipe了,这里为什么在pathPipe函数中还要监听重新patch一次?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions