Punch静的サイト ジェネレーター用のautoprefixer プリプロセッサを実装したいと考えています。
ただし、Punch の用語では、これがコンパイラ、ミニファイヤなどに該当するかどうかはわかりません。上記のすべてを試してみましたが、役に立ちませんでした。
何かを機能させるための私の最近の試みは次のとおりです。
./autoprefixer.js
module.exports = {
input_extensions: [".css"],
force_compile: true,
compile: function(input, filename, callback){
return callback(null, "*{color: red;}");
}
};
config.json
...
"plugins": {
"compilers": {
".css": "punch-sass-compiler",
".css": "autoprefixer"
}
}
...
result
/home/peter/projects/website/node_modules/punch/lib/asset_bundler.js:62
if (compiler && compiler.input_extensions.indexOf(template_extension) > -1)
^
TypeError: Cannot read property 'indexOf' of undefined
at /home/peter/projects/website/node_modules/punch/lib/asset_bundler.js:62:45
at /home/peter/projects/website/node_modules/punch/lib/template_handler.js:119:11
at fs.js:334:14
at /home/peter/projects/website/node_modules/punch/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js:42:10
at FSReqWrap.oncomplete (fs.js:95:15)
誰かが私を正しい方向に導くことができますか?