cli/builtin/plugin.js
function(cb) {
            fs.exists(path.join(potterHome, 'package.json'), function(exists) {
                if(exists) {
                    cb(null);
                } else {
                    var packagejson = '{"dependencies":{}}';
                    fs.writeFile(path.join(potterHome, 'package.json'), packagejson, cb);
                }
            });
        }
function(cb) {
            fs.exists(path.join(potterHome, 'package.json'), function(exists) {
                if(exists) {
                    cb(null);
                } else {
                    var packagejson = '{"dependencies":{}}';
                    fs.writeFile(path.join(potterHome, 'package.json'), packagejson, cb);
                }
            });
        }
function ( cb ) { fs . exists ( path . join ( potterHome , 'package.json' ) , function ( exists ) { if ( exists ) { cb ( null ) ; } else { var packagejson = '{"dependencies":{}}' ; fs . writeFile ( path . join ( potterHome , 'package.json' ) , packagejson , cb ) ; } } ) ; }
make sure a package.json exists
make sure a package . json exists