Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4 Site - Mantine #55

Merged
merged 21 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
4 changes: 0 additions & 4 deletions .devcontainer/devcontainer.json

This file was deleted.

15 changes: 15 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3'
services:
gatsby:
image: mcr.microsoft.com/devcontainers/typescript-node
volumes:
- ./..:/workspace:cached
command: sleep infinity
links:
- php-build
php-build:
build:
dockerfile: ./DockerfilePHP
volumes:
- ./..:/workspace:cached
command: sleep infinity
16 changes: 16 additions & 0 deletions .devcontainer/gatsby/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"customizations": {
"vscode": {
"extensions": [
"esbenp.prettier-vscode",
"christian-kohler.npm-intellisense",
"dbaeumer.vscode-eslint"
]
}
},
"name": "Gatsby Container (build this one first)",
"postCreateCommand": "npm install",
"dockerComposeFile": ["../docker-compose.yml"],
"service": "gatsby",
"workspaceFolder": "/workspace"
}
8 changes: 8 additions & 0 deletions .devcontainer/php-build/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "PHP Container",
"postCreateCommand": "composer install -d data/php",
"dockerComposeFile": ["../docker-compose.yml"],
"service": "php-build",
"shutdownAction": "none",
"workspaceFolder": "/workspace"
}
32 changes: 0 additions & 32 deletions .eslintrc.js

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
time: "17:00"
timezone: "Europe/London"
open-pull-requests-limit: 1
groups:
actions-dependencies:
patterns:
- "*"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
time: "17:00"
timezone: "Europe/London"
open-pull-requests-limit: 1
groups:
npm-dependencies:
patterns:
- "*"
89 changes: 1 addition & 88 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,92 +1,5 @@
# Logs
.firebase
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# See https://help.github.com/ignore-files/ for more about ignoring files.

# testing
/coverage

# production
/build

node_modules/
.cache/
public


# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

.stencil/

.vscode/

.idea/


src/gatsby-types.d.ts
data/php/vendor/
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"cSpell.words": [
"htmlfilename",
"luxon",
"mantine",
"pdfs",
"porthmadog",
"ukho"
]
}
20 changes: 20 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Run PHP Build Script",
"type": "shell",
"command": "php ./data/php/dataParser.php",
"windows": {
"command": "php .\\data\\php\\dataParser.php"
},
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
}
}
]
}
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
# Porthmadog Tide Times

The third iteration of this site is a React app, compiled to a static site using Gatsby. Styling framework is Tailwind.
The fourth iteration of this site is a React app, compiled to a static site using Gatsby. Styling framework is Mantine.

## Development

### VSCode

Two containers are provided - one is a Gatsby container and the other is a PHP container. The Gatsby container is used to run the Gatsby development server and the PHP container is used to run the PHP script that generates the json tidal data and which generates the PDFs. A VSCode task is provided for running the build script.

#### Connect to both containers in two VS Code windows

1. Open a VS Code window at the root level of the project.
1. Run Dev Containers: Reopen in Container from the Command Palette (F1) and select `Gatsby Container`.
1. VS Code will then start up both containers, reload the current window and connect to the selected container.
1. Next, open a new window using File > New Window.
1. Open your project at root level in the current window.
1. Run Dev Containers: Reopen in Container from the Command Palette (F1) and select `PHP Container`.
1. The current VS Code window will reload and connect to the selected container.
1. You can now interact with both containers from separate windows.

#### Connect to multiple containers in a single VS Code window

1. Open a VS Code window at the root level of the project.
1. Run Dev Containers: Reopen in Container from the Command Palette (F1) and select `Gatsby Container`.
1. VS Code will then start up both containers, reload the current window and connect to the selected container.
1. Run Dev Containers: Switch Container from the Command Palette (F1) and select `PHP Container`.
1. The current VS Code window will reload and connect to the selected container.
1. You can switch back with the same command

## Copyright Information

Expand Down
Loading