Skip to content

Commit

Permalink
Move out of src/
Browse files Browse the repository at this point in the history
  • Loading branch information
mbardelmeijer committed May 15, 2022
1 parent 3e6f545 commit 574e557
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/build.php → build.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
use Twig\Environment as TwigEnvironment;
use Twig\Loader\FilesystemLoader as TwigFilesystemLoader;

require '../vendor/autoload.php';
require 'vendor/autoload.php';

$codes = require 'codes.php';

$loader = new TwigFilesystemLoader(__DIR__ . '/../views');
$loader = new TwigFilesystemLoader(__DIR__ . '/views');
$twig = new TwigEnvironment($loader);

foreach ($codes as $code) {
$rendered = $twig->render('codes/' . $code . '.twig', ['code' => $code]);

file_put_contents(__DIR__ . '/../dist/' . $code . '.html', $rendered);
file_put_contents(__DIR__ . '/dist/' . $code . '.html', $rendered);
}
File renamed without changes.
7 changes: 0 additions & 7 deletions src/symlink.php

This file was deleted.

7 changes: 7 additions & 0 deletions symlink.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

$codes = require 'codes.php';

foreach ($codes as $code) {
exec('ln -s ' . __DIR__ . '/dist/' . $code . '.html ../custom_' . $code . '.html');
}

0 comments on commit 574e557

Please sign in to comment.