Skip to content

Instantly share code, notes, and snippets.

@aaitken
Last active August 29, 2015 13:56
Show Gist options
  • Save aaitken/9149010 to your computer and use it in GitHub Desktop.
Save aaitken/9149010 to your computer and use it in GitHub Desktop.
Trying to get running with docpad-plugin-browserifydocs
===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();
@balupton
Copy link

Try this:

===scripts/test/tester.js===
module.exports = function(){
  console.log('I am tester!');
};


===scripts/app.js===
--- cson
browserify: require: ['./test/tester']

---

var tester = require('./test/tester');
tester();

@aaitken
Copy link
Author

aaitken commented Feb 22, 2014

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment