github地址
也可以點(diǎn)擊這個(gè)然后搜索install
1.安裝全局的autoprefixer
npm *install* --global postcss-cli autoprefixer
2. 通過(guò)命令行調(diào)用
postcss --use autoprefixer *.css -d build/
其中-d表示最終目的地(destination)這樣會(huì)把文件存放在當(dāng)前文件夾里面新建的build文件夾中
3.具體運(yùn)用
-
如果我們要把d盤(pán)的autoprefixer文件夾下的css自動(dòng)添加前綴
- 運(yùn)行postcss --use autoprefixer style.css -d build/
!查看生成的文件](http://upload-images.jianshu.io/upload_images/3635292-bacedce86b75235e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
3.1. 切換文件的保存路徑
postcss --use autoprefixer try.css -d /f/build/