diff --git a/.gitignore b/.gitignore index a82ca6b..e66fc7e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /node_modules /docs +/.build diff --git a/config.php b/config.php index 0e86f86..9043f33 100644 --- a/config.php +++ b/config.php @@ -6,7 +6,7 @@ return [ 'icon_dir' => __DIR__ . '/assets/icons', 'code_dir' => __DIR__ . '/code', 'templates_dir' => __DIR__ . '/assets/templates', - 'output_dir' => __DIR__ . '/docs', + 'output_dir' => __DIR__ . '/.build', 'pages' => [ Page::create('index', 'index.phtml'), Page::create('credits', 'credits.phtml'), diff --git a/package.json b/package.json index 9be5950..605cd74 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,6 @@ "name": "phpapprentice", "version": "1.0.0", "description": "A website for learning PHP", - "directories": { - "doc": "docs" - }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build": "./node_modules/.bin/encore dev", diff --git a/src/Command/ServerCommand.php b/src/Command/ServerCommand.php index 84859f7..756c1f4 100644 --- a/src/Command/ServerCommand.php +++ b/src/Command/ServerCommand.php @@ -18,6 +18,6 @@ class ServerCommand extends Command protected function execute(InputInterface $input, OutputInterface $output) { $output->writeln('Starting development server on localhost:8080'); - system('php -S localhost:8080 -t docs src/util/router.php'); + system('php -S localhost:8080 -t ' . config('output_dir') . ' src/util/router.php'); } } diff --git a/webpack.config.js b/webpack.config.js index c2e3d84..54ce9e1 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,7 +1,7 @@ var Encore = require('@symfony/webpack-encore'); Encore - .setOutputPath('docs') + .setOutputPath('.build') .setPublicPath('/') .addEntry('js/site', './assets/js/site.js') .addStyleEntry('css/site', './assets/css/site.css')