Created by: Paxa
For my opened issue #294 (closed):
sweet.loadedMacros
- array of macros used with node-loader.
sweet.loadMacro(file)
- helper to load macros. Same as sweet.loadedMacros.push(sweet.loadNodeModule(process.cwd(), './macros/str'))
Example:
var sweet = require('sweet.js');
sweet.loadMacro('./macros/str');
require('./test.sjs');
Note: it doesn't work if we load macros inside executing file and use in same file
sweet.loadMacro('./macros/puts');
puts 123; // not working