MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / projectOrnullProject

Method projectOrnullProject

lib/models/project.js:700–710  ·  view source on GitHub ↗

Returns a new project based on the first package.json that is found in `pathName`, or the nullProject. The nullProject signifies no-project, but abides by the null object pattern @private @static @method projectOrnullProject @param {UI} _ui The UI instance to provide to th

(_ui, _cli)

Source from the content-addressed store, hash-verified

698 @return {Project} Project instance
699 */
700 static projectOrnullProject(_ui, _cli) {
701 try {
702 return Project.closestSync(process.cwd(), _ui, _cli);
703 } catch (reason) {
704 if (reason instanceof Project.NotFoundError) {
705 return Project.nullProject(_ui, _cli);
706 } else {
707 throw reason;
708 }
709 }
710 }
711
712 /**
713 Returns the project root based on the first package.json that is found

Callers 1

index.jsFile · 0.80

Calls 2

closestSyncMethod · 0.80
nullProjectMethod · 0.80

Tested by

no test coverage detected