Browse files

fixing importing tasks from npm

  • Loading branch information...
1 parent 942151c commit 086062ec854624fcb8404c7e8ca74cf3dfa1a19c @dethe committed Jul 27, 2012
Showing with 8 additions and 6 deletions.
  1. +2 −5 grunt.js
  2. +6 −1 tasks/extract.js
View
7 grunt.js
@@ -21,10 +21,7 @@ module.exports = function(grunt){
});
// load extract task
- try{
- grunt.loadTasks('tasks');
- }catch(e){
- grunt.loadNpmTasks('obloq/tasks');
- }
+ grunt.loadTasks('tasks');
+
grunt.registerTask('default', 'clean extract doc');
};
View
7 tasks/extract.js
@@ -61,7 +61,12 @@ module.exports = function(grunt) {
appendToPath(dest, html);
});
});
- var index = fs.readFileSync('lib/index.template', 'utf8');
+ var index;
+ try{
+ index = fs.readFileSync('lib/index.template', 'utf8');
+ }catch(e){
+ index = fs.readFileSync('node_modules/obloq/lib/index.template', 'utf8');
+ }
var $ = cheerio.load(index);
var holder = $('#menu ul');
holder.empty();

0 comments on commit 086062e

Please sign in to comment.