Skip to content

Commit c96778d

Browse files
committed
craft and craft.bat
1 parent f243b28 commit c96778d

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

craft

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env php
2+
<?php
3+
/**
4+
* Craft console bootstrap file
5+
*/
6+
7+
// Project root path
8+
$root = __DIR__;
9+
10+
// Composer autoloader
11+
require_once $root.'/vendor/autoload.php';
12+
13+
// dotenv
14+
$dotenv = new Dotenv\Dotenv($root);
15+
$dotenv->load();
16+
17+
// Craft
18+
define('CRAFT_BASE_PATH', $root);
19+
$app = require $root.'/vendor/craftcms/cms/bootstrap/console.php';
20+
$exitCode = $app->run();
21+
exit($exitCode);

craft.bat

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@echo off
2+
3+
rem -------------------------------------------------------------
4+
rem Craft command line bootstrap script for Windows
5+
rem -------------------------------------------------------------
6+
7+
@setlocal
8+
9+
set CRAFT_PATH=%~dp0
10+
11+
if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe
12+
13+
"%PHP_COMMAND%" "%CRAFT_PATH%craft" %*
14+
15+
@endlocal

0 commit comments

Comments
 (0)