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

feat: move to @angular/material #7

Merged
merged 4 commits into from
Jan 2, 2025
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
97 changes: 46 additions & 51 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,64 +7,59 @@ on:
branches: [ "main" ]

jobs:

build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
strategy:
# Failure in one platform build won't impact the others
fail-fast: false
matrix:
build:
- platform: 'linux/amd64'
os: 'ubuntu-latest'
- platform: 'windows/amd64'
os: 'windows-latest'
- platform: 'darwin/universal'
os: 'macos-latest'

- name: Build Windows/amd64
run: wails build -platform windows/amd64
runs-on: ${{ matrix.build.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Build macOS/universal
run: wails build -platform darwin/universal
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Build artifacts (Windows and macOS)
path: build/bin/*
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.11'

build-linux:
runs-on: ubuntu-latest
- name: Install Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest

steps:
- uses: actions/checkout@v3
- name: Install Linux Dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install libgtk-3-0 libwebkit2gtk-4.1-dev gcc-aarch64-linux-gnu

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Build App
if: runner.os != 'Linux'
run: wails build -platform ${{ matrix.build.platform }}

- name: Install Wails Build Dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential libgtk-3-dev libwebkit2gtk-4.0-dev pkg-config
- name: Build Linux App
if: runner.os == 'Linux'
run: wails build -platform ${{ matrix.build.platform }} -tags webkit2_41

- name: Build Linux/amd64
run: wails build -platform linux/amd64
- name: Add macOS perms
if: runner.os == 'macOS'
working-directory: .
run: chmod +x build/bin/*/Contents/MacOS/*
shell: bash

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Build artifacts Linux
path: build/bin/*
- name: Archive Artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts ${{ runner.os }}
path: build/bin/*
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Simple implementation of Conway's "Game of Life" using [wails.io](https://wails.

The user interface is quite simple

![User Interface](Screenshot.png)
![User Interface Light](game-of-life-light.png)
![User Interface Dark](game-of-life-dark.png)

There're 3 buttons and a canvas the prints the nth generation of the cells.

Expand All @@ -18,6 +19,6 @@ There're 3 buttons and a canvas the prints the nth generation of the cells.

If you want to build the code your self you have to

* Install Go (1.18+)
* Install Go (1.21+)
* Install Wails
* Run `wails dev` and have fun
Binary file removed Screenshot.png
Binary file not shown.
Binary file added build/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion build/darwin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plist version="1.0"><dict>
<key>CFBundlePackageType</key><string>APPL</string>
<key>CFBundleName</key><string>{{.Info.ProductName}}</string>
<key>CFBundleExecutable</key><string>{{.Name}}</string>
<key>CFBundleExecutable</key><string>game-of-life</string>
<key>CFBundleIdentifier</key><string>io.massimocosta.game-of-life</string>
<key>CFBundleVersion</key><string>{{.Info.ProductVersion}}</string>
<key>CFBundleGetInfoString</key><string>{{.Info.Comments}}</string>
Expand Down
17 changes: 17 additions & 0 deletions frontend/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single
ij_typescript_use_double_quotes = false

[*.md]
max_line_length = off
trim_trailing_whitespace = false
42 changes: 42 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.

# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# Node
/node_modules
npm-debug.log
yarn-error.log

# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings

# System files
.DS_Store
Thumbs.db
4 changes: 4 additions & 0 deletions frontend/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": ["angular.ng-template"]
}
20 changes: 20 additions & 0 deletions frontend/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http://localhost:9876/debug.html"
}
]
}
42 changes: 42 additions & 0 deletions frontend/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "start",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
},
{
"type": "npm",
"script": "test",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
}
]
}
59 changes: 59 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Frontend

This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.0.2.

## Development server

To start a local development server, run:

```bash
ng serve
```

Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.

## Code scaffolding

Angular CLI includes powerful code scaffolding tools. To generate a new component, run:

```bash
ng generate component component-name
```

For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:

```bash
ng generate --help
```

## Building

To build the project run:

```bash
ng build
```

This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.

## Running unit tests

To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:

```bash
ng test
```

## Running end-to-end tests

For end-to-end (e2e) testing, run:

```bash
ng e2e
```

Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.

## Additional Resources

For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
Loading
Loading