init project
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
import { config } from '../../config.js';
|
||||
import { detectProject } from '../../lib/frameworks/detect.js';
|
||||
import { CodeIgniterAdapter } from '../../lib/frameworks/codeigniter.js';
|
||||
export function requireCodeIgniter() {
|
||||
const detected = detectProject(config.workspaceRoot);
|
||||
if (detected.backend instanceof CodeIgniterAdapter) {
|
||||
return detected.backend;
|
||||
}
|
||||
throw new Error('No CodeIgniter 4 project detected in WORKSPACE_ROOT. ' +
|
||||
'Expected composer.json with codeigniter4/framework (or a spark file) at the workspace root.');
|
||||
}
|
||||
//# sourceMappingURL=requireCodeIgniter.js.map
|
||||
Reference in New Issue
Block a user