I can change it to something like:

```javascript
var packageName = project.name();
// ...
if (!packageName) {
  packageName = path.basename(cwd);
}
```

That will reduce branching.