I would like to implement an autoprefixer preprocessor for a punch static node generator.
However, in the Punch language, I'm not sure if it will qualify as a compiler, minifier, etc. I tried all of the above to no avail.
Here is my most recent attempt to get something working:
./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)
Can someone direct me in the right direction?
source share