所以目前我在使用自动前缀时遇到了麻烦。
我已将 postcss-cli 和 autoprefixer 下载到 --save-dev 和 -g
当我运行这样的命令时:
postcss ../../../htdocs/css/workflow/homepage-announcements.css -o ../../../htdocs/css/workflow/homepage-announcements.css
工作正常与输出:
✔ 完成 ../../../htdocs/css/workflow/homepage-announcements.css (25ms)
现在我已经使用--use autoprefixer
了一个错误。下面的命令。
postcss --use autoprefixer ../../../htdocs/css/workflow/homepage-announcements.css -o ../../../htdocs/css/workflow/homepage-announcements.css
错误信息:
✖插件错误:找不到模块'../../../htdocs/css/workflow/homepage-announcements.css'
我已经尝试了一切,但仍然没有解决方案:(
{
"name": "homepage-announcements",
"version": "2.0.0",
"description": "Homepage announcements",
"main": "js/Default.js",
"dependencies": {
"react": "^15.4.2"
},
"devDependencies": {
"autoprefixer": "^6.7.7",
"ava": "^0.18.2",
"babel-loader": "^6.4.1",
"eslint": "^3.19.0",
"node-sass": "^4.5.2",
"postcss": "^5.2.16",
"postcss-cli": "^3.1.1",
"webpack": "^2.3.3",
"xo": "^0.18.1"
},
"scripts": {
"build": "webpack -p && npm run sass && npm run css",
"sass": "node-sass scss/default.scss ../../../htdocs/css/workflow/homepage-announcements.css --output-style compressed && npm run css",
"css": "postcss --use autoprefixer ../../../htdocs/css/workflow/homepage-announcements.css -o ../../../htdocs/css/workflow/homepage-announcements.css",
"lint": "xo js/*.js js/**/*.js js/**/**/*.js js/**/**/**/*.js js/**/**/**/**/*.js js/**/**/**/**/**/*.js"
}