码迷,mamicode.com
首页 > 其他好文 > 详细

[NPM] Pipe data from one npm script to another

时间:2017-02-06 20:45:41      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:lin   script   nod   rom   .json   ssr   div   index   rip   

In an effort to bypass saving temporary build files you can leverage piping and output redirection to streamline your build process. In addition using these technique can speed up your build process.

 

"build:css": "node-sass src/index.scss | postcss -c .postcssrc.json | cssmin > public/index.min.css",

So first it goes though:

  • node-sass src/index.scss
  • Then pass the result into "postcss -c .postcssrc.json"
  • Then pass the reuslt into "cssmin"

After those, create a output file "index.min.css" and write the result.

 

[NPM] Pipe data from one npm script to another

标签:lin   script   nod   rom   .json   ssr   div   index   rip   

原文地址:http://www.cnblogs.com/Answer1215/p/6371596.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!