-
-
Save aaitken/9149010 to your computer and use it in GitHub Desktop.
===scripts/test/tester.js=== | |
--- | |
browserify: true | |
--- | |
module.exports = function(){ | |
console.log('I am tester!'); | |
}; | |
===scripts/app.js=== | |
--- | |
browserify: true | |
--- | |
var tester = require('./test/tester'); | |
tester(); |
Thanks. For some reason, though, when I put the require in the meta it can't find the module:
error: Something went wrong with the action
error: An error occured:
Error: Cannot find module '0' from '/Users/alex.aitken/Projects/alex-ai-browserify'
at /Users/alex.aitken/Projects/alex-ai-browserify/node_modules/docpad-plugin-browserifydocs/node_modules/browserify/node_modules/resolve/lib/async.js:44:17
at process (/Users/alex.aitken/Projects/alex-ai-browserify/node_modules/docpad-plugin-browserifydocs/node_modules/browserify/node_modules/resolve/lib/async.js:110:43)
at /Users/alex.aitken/Projects/alex-ai-browserify/node_modules/docpad-plugin-browserifydocs/node_modules/browserify/node_modules/resolve/lib/async.js:119:21
at load (/Users/alex.aitken/Projects/alex-ai-browserify/node_modules/docpad-plugin-browserifydocs/node_modules/browserify/node_modules/resolve/lib/async.js:54:43)
at /Users/alex.aitken/Projects/alex-ai-browserify/node_modules/docpad-plugin-browserifydocs/node_modules/browserify/node_modules/resolve/lib/async.js:60:22
at /Users/alex.aitken/Projects/alex-ai-browserify/node_modules/docpad-plugin-browserifydocs/node_modules/browserify/node_modules/resolve/lib/async.js:16:47
at Object.oncomplete (fs.js:107:15)
Try this: