Closed xiaoice closed 9 years ago
Duo restricts itself only to the root of your project. (ie: the directory you are running duo from)
If you want to be able to require something, it needs to be within your project's hierarchy.
thanks!
code:// Duo.prototype.cleanCache = function *() { debug('clearing cache'); yield rm(this.installPath('duo.json')); };
console://
Duo.prototype.cleanCache = function () {
^
SyntaxError: Unexpected token
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.
node -v : v0.12.2
You need to use the --harmony-generators
flag if you're not using the CLI.
thanks! like this: https://github.com/duojs/duo/blob/master/examples/gulpfile/gulpfile.js
how to start?
I don't use gulp, personally. If it's part of your usual toolset, then that's probably a great start.
If you're just getting started, the CLI is pretty easy-to-use. (I often use a Makefile
w/ the CLI directly)
If you have further one-off questions like this, head on over to the gitter chat room. I'll close this issue now.
ok,thanks!
No problem! I hope you enjoy using duo :)
code: var Duo = require('../../');
console: Error: Cannot find module '../../'
why?