Skip to content

Commit 5b1da8f

Browse files
committed
Merge branch 'v3'
2 parents e6ee0dc + 8330fb1 commit 5b1da8f

File tree

8 files changed

+3
-142
lines changed

8 files changed

+3
-142
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The installer has not been tested on Windows yet, but it should work. Let me kno
88

99
It is possible to install WordPress through the installer. You will be prompted with this option.
1010

11-
Note that this will setup WordPress, but you still need a local development enviroment for PHP and MySQL. If you use MacOS, try out [Laravel Valet](https://laravel.com/docs/8.x/valet).
11+
Note that this will setup WordPress, but you still need a local development environment for PHP and a database. If you use MacOS, try out [Laravel Valet](https://laravel.com/docs/11.x/valet) or [Herd](https://herd.laravel.com).
1212

1313
## Release notes
1414

bin/tailpress

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if (file_exists(__DIR__.'/../../../autoload.php')) {
77
require __DIR__.'/../vendor/autoload.php';
88
}
99

10-
$app = new Symfony\Component\Console\Application('TailPress Installer', '2.0.4');
10+
$app = new Symfony\Component\Console\Application('TailPress Installer', '3.0.0');
1111

1212
$app->add(new Jeffreyvr\TailPressInstaller\Console\NewCommand);
1313

src/Console/NewCommand.php

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ protected function configure()
2323
->addOption('git', null, InputOption::VALUE_NONE, 'Initialize a Git repository')
2424
->addOption('branch', null, InputOption::VALUE_REQUIRED, 'The branch that should be created for a new repository', $this->defaultBranch())
2525
->addOption('wordpress', null, InputOption::VALUE_NONE, 'Install WordPress.')
26-
->addOption('compiler', null, InputOption::VALUE_OPTIONAL, 'Compiling tool can either be mix (Laravel Mix) or esbuild.', 'mix')
2726
->addOption('dbname', null, InputOption::VALUE_OPTIONAL, 'The name of your database.')
2827
->addOption('dbuser', null, InputOption::VALUE_OPTIONAL, 'The name of your database user.', 'root')
2928
->addOption('dbpass', null, InputOption::VALUE_OPTIONAL, 'The password of your database.', 'root')
@@ -49,8 +48,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
4948
false
5049
));
5150

52-
$compiler = $input->getOption('compiler');
53-
5451
$folder = $input->getArgument('folder');
5552
$slug = $this->determineSlug($folder);
5653
$prefix = $this->determineSlug($folder, true);
@@ -68,14 +65,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
6865
}
6966

7067
$commands[] = "cd \"$workingDirectory\"";
71-
$commands[] = "git clone -b 3.x https://github.com/jeffreyvr/tailpress.git . --q";
68+
$commands[] = "git clone -b 4.x https://github.com/jeffreyvr/tailpress.git . --q";
7269

7370
if (($process = $this->runCommands($commands, $input, $output))->isSuccessful()) {
74-
if ($compiler === 'esbuild') {
75-
$this->replaceFilesWithStubs($workingDirectory, 'esbuild', ['package.json', 'postcss.config.js']);
76-
$this->deleteFiles($workingDirectory, ['webpack.mix.js', 'mix-manifest.json']);
77-
}
78-
7971
if ($name = $input->getOption('name')) {
8072
$this->replaceInFile('TailPress', $name, $workingDirectory.'/style.css');
8173
$this->replaceInFile('tailpress', $prefix, $workingDirectory.'/style.css');
@@ -171,13 +163,6 @@ protected function replaceThemeHeader(string $stylesheet, string $header, string
171163
file_put_contents($stylesheet, $content);
172164
}
173165

174-
protected function replaceFilesWithStubs(string $workingDirectory, string $stubFolder, array $stubs)
175-
{
176-
foreach ($stubs as $stub) {
177-
file_put_contents($workingDirectory.'/' . $stub, file_get_contents(__DIR__ . '/../../stubs/'.$stubFolder.'/'.$stub.'.stub'));
178-
}
179-
}
180-
181166
protected function deleteFiles(string $workingDirectory, array $files)
182167
{
183168
foreach ($files as $file) {

stubs/esbuild/package.json.stub

Lines changed: 0 additions & 42 deletions
This file was deleted.

stubs/esbuild/postcss.config.js.stub

Lines changed: 0 additions & 8 deletions
This file was deleted.

stubs/mix/package.json.stub

Lines changed: 0 additions & 34 deletions
This file was deleted.

stubs/mix/postcss.config.js.stub

Lines changed: 0 additions & 8 deletions
This file was deleted.

stubs/mix/webpack.mix.js.stub

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)