UNPKG

rpio2

Version:

Control Raspberry Pi GPIO pins with node.js. Fast and easy to use.

15 lines (13 loc) 332 B
module.exports = function(babel) { var t = babel.types; return {visitor: { CallExpression: function(path){ if(path.node.callee.name === 'require'){ var module = path.node.arguments[0]; if(module && module.value === 'rpio'){ module.value = '../rpio_sim.js'; } } } }}; };