首页 > 代码库 > [NPM] Pipe data from one npm script to another
[NPM] Pipe data from one npm script to another
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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。