ElementUI / element-theme

Theme generator cli tool for Element.
MIT License
491 stars 142 forks source link

监听代码在首次运行时如何让其不影响其他运行重复反馈 #7

Closed shomychen closed 7 years ago

shomychen commented 7 years ago

将监听代码加入到框架构建的开发模式(webpack.dev.conf.js)下,为什么启动的时候会有多余重复的命令打印出来

使用方式:

var et = require('element-theme')
// watch mode
et.watch({
  config: './src/assets/varieties.css',
  out: './src/assets/css'
})

以下是控制台打印的重复命令提示:


webpack: wait until bundle finished: /index.html
√ build theme font
webpack built 8995c2f2442cf844547a in 7292ms
Hash: 8995c2f2442cf844547a
Version: webpack 1.14.0
Time: 7292ms
                                 Asset       Size  Chunks             Chunk Names
static/fonts/element-icons.a61be9c.eot    13.5 kB          [emitted]  
static/fonts/element-icons.b02bdc1.ttf    13.2 kB          [emitted]  
  static/img/element-icons.09162bc.svg    17.4 kB          [emitted]  
                                app.js    4.22 MB       0  [emitted]  app
                            index.html  249 bytes          [emitted]  
Child html-webpack-plugin for "index.html":
         Asset     Size  Chunks       Chunk Names
    index.html  1.47 MB       0       
webpack: bundle is now VALID.
webpack: bundle is now INVALID.
webpack: wait until bundle finished: /app.js
webpack building...
webpack built a844ddcd769a07a2993d in 1152ms
Hash: a844ddcd769a07a2993d
Version: webpack 1.14.0
Time: 1152ms
                                 Asset      Size  Chunks             Chunk Names
static/fonts/element-icons.a61be9c.eot   13.5 kB                     
static/fonts/element-icons.b02bdc1.ttf   13.2 kB                     
  static/img/element-icons.09162bc.svg   17.4 kB                     
                                app.js   4.24 MB       0  [emitted]  app
  0.8995c2f2442cf844547a.hot-update.js   25.6 kB       0  [emitted]  app
  8995c2f2442cf844547a.hot-update.json  36 bytes          [emitted]  
Child html-webpack-plugin for "index.html":
         Asset     Size  Chunks       Chunk Names
    index.html  1.47 MB       0       
webpack: bundle is now VALID.
webpack: bundle is now INVALID.
webpack building...
webpack built a844ddcd769a07a2993d in 882ms
Hash: a844ddcd769a07a2993d
Version: webpack 1.14.0
Time: 882ms
                                 Asset     Size  Chunks       Chunk Names
static/fonts/element-icons.a61be9c.eot  13.5 kB               
static/fonts/element-icons.b02bdc1.ttf  13.2 kB               
  static/img/element-icons.09162bc.svg  17.4 kB               
                                app.js  4.24 MB       0       app
Child html-webpack-plugin for "index.html":
         Asset     Size  Chunks       Chunk Names
    index.html  1.47 MB       0       
webpack: bundle is now VALID.
√ watch element theme
QingWei-Li commented 7 years ago

https://github.com/1337programming/webpack-shell-plugin 可以试试这个 不确定能不能行