Skip to content

Commit 1a51f02

Browse files
authored
Lets get eyris installed. (#53)
1 parent dd2641f commit 1a51f02

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

.env.thoughtco

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ STATAMIC_GIT_ENABLED=false
1414
STATAMIC_SUPPORT_URL='/cp/resources'
1515
STATAMIC_REVISIONS_PATH=
1616

17+
#EYRIS_TOKEN=
18+
1719
LOG_CHANNEL=daily
1820

1921
DB_CONNECTION=mysql

StarterKitPostInstall.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,20 @@ public function handle($console)
1414
$appURL = $console->ask('What is the app url?');
1515
$revisionPath = $console->ask('What path do you want to use for revisions?', 'content/revisions');
1616
$connectionType = $console->ask('What queue connection do you want?', 'redis');
17+
$eyrisToken = $console->ask('Enter the token for Eyris?', null, function ($value) {
18+
if (empty($value)) {
19+
throw new \RuntimeException('Eyris token is required.');
20+
}
21+
return $value;
22+
});
1723

1824
$env = app('files')->get(base_path('.env.thoughtco'));
1925
$env = str_replace("APP_NAME=", "APP_NAME=\"{$appName}\"", $env);
2026
$env = str_replace('APP_URL=', "APP_URL=\"{$appURL}\"", $env);
2127
$env = str_replace('APP_KEY=', "APP_KEY=\"{$originalAppKey}\"", $env);
2228
$env = str_replace('STATAMIC_REVISIONS_PATH=', "STATAMIC_REVISIONS_PATH=\"{$revisionPath}\"", $env);
2329
$env = str_replace('QUEUE_CONNECTION=sync', "QUEUE_CONNECTION=\"{$connectionType}\"", $env);
30+
$env = str_replace('EYRIS_TOKEN=', "EYRIS_TOKEN=\"{$eyrisToken}\"", $env);
2431

2532
app('files')->put(base_path('.env'), $env);
2633
$console->info('<info>[✓]</info> generate env');
@@ -49,6 +56,9 @@ public function handle($console)
4956
$this->runProcess(['composer', 'require', 'laravel/horizon'], $console, 'laravel horizon installed');
5057
$this->runProcess(['php', 'artisan', 'horizon:install'], $console, 'horizon assets published');
5158

59+
$this->runProcess(['composer', 'require', 'thoughtco/statamic-eyris'], $console, 'eyris installed');
60+
$this->runProcess(['php', 'artisan', 'vendor:publish --tag=statamic-eyris'], $console, 'eyris assets published');
61+
5262
$this->runProcess(['php', 'artisan', 'queue:restart'], $console, 'queues restarted');
5363

5464
$this->runProcess(['npm', 'install', '--force'], $console, 'npm packages installed');

starter-kit.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,6 @@ dependencies:
4848
thoughtco/statamic-cache-tracker: '^2.0'
4949
thoughtco/statamic-cookiepanel: ^2.3
5050
thoughtco/statamic-cp-resources: ^1.0
51+
thoughtco/statamic-eyris: ^1.1
5152
thoughtco/statamic-postmark-spamcheck: ^1.0
5253
thoughtco/statamic-redirects: ^2.0

0 commit comments

Comments
 (0)