stephenmathieson / node-obfuscator

maintainer wanted → Obfuscate your node packages because your boss says so!
216 stars 36 forks source link

Cannot run the obfuscator task: Invalide root directory #11

Closed lucj closed 10 years ago

lucj commented 10 years ago

I use the following config for my obfuscator task:

obfuscator: {
     files: [
      'app.js',
      'config/*.js',
      'lib/*.js'
     ],
     entry: 'app.js',
     out: 'obfuscated.js',
     strings: true
   }

but I got the following error when running

grunt obfustate

Running "obfuscator" task Warning: Invalid root directory Use --force to continue.

Any idea of this error message ?

stephenmathieson commented 10 years ago

yep, you're not specifying the project root. try:

obfuscator: {
     files: [
      'app.js',
      'config/*.js',
      'lib/*.js'
     ],
     entry: 'app.js',
     out: 'obfuscated.js',
     strings: true,
     root: __dirname
   }

i'll update the docs soon

lucj commented 10 years ago

Thanks a lot, I'll check this. Le 20 déc. 2013 20:39, "Stephen Mathieson" notifications@github.com a écrit :

yep, you're not specifying the project root. try:

obfuscator: { files: [ 'app.js', 'config/.js', 'lib/.js' ], entry: 'app.js', out: 'obfuscated.js', strings: true, root: __dirname }

i'll update the docs soon

— Reply to this email directly or view it on GitHubhttps://github.com/stephenmathieson/node-obfuscator/issues/11#issuecomment-31035778 .