Skip to content

Commit

Permalink
Merge pull request #11 from LukWebsForge/geist-ui
Browse files Browse the repository at this point in the history
Geist UI redesign
  • Loading branch information
lukbukkit authored May 29, 2021
2 parents 433dc7f + 8260639 commit db68a05
Show file tree
Hide file tree
Showing 42 changed files with 2,156 additions and 1,225 deletions.
38 changes: 15 additions & 23 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,18 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.16

- name: Setup Node.js environment
uses: actions/[email protected]

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Setup Task
run: curl -sL https://taskfile.dev/install.sh | sh

- name: Build using Taskfile.yml
run: ./bin/task build

- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: compiled-application-amd64-ubuntu
path: out/*
- uses: actions/setup-go@v2
with:
go-version: ^1.16
- uses: actions/setup-node@v2
with:
node-version: '16'
- uses: actions/checkout@v2
- name: Setup Task
run: curl -sL https://taskfile.dev/install.sh | sh
- name: Build using Taskfile.yml
run: ./bin/task build
- uses: actions/upload-artifact@v2
with:
name: compiled-application-amd64-ubuntu
path: out/*
22 changes: 22 additions & 0 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: JS

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: yarn
working-directory: resources
- run: yarn lint
working-directory: resources
72 changes: 31 additions & 41 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,34 @@ jobs:
name: Build (Release)
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13

- name: Setup Node.js environment
uses: actions/[email protected]

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Setup Task
run: curl -sL https://taskfile.dev/install.sh | sh

- name: Build using Taskfile.yml
run: ./bin/task release

- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: compiled-application-amd64-ubuntu
path: out/*

- name: Publish
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
out/update_linux_amd64
out/update_linux_arm
out/update_windows_amd64.exe
draft: true
name: Release ${{ github.ref }}
body: |
Changes in this Release
- First Change
- Second Change
- [ ] You've listed all important changes / pull requests
- uses: actions/setup-go@v2
with:
go-version: ^1.16
- uses: actions/setup-node@v2
with:
node-version: '16'
- uses: actions/checkout@v2
- name: Setup Task
run: curl -sL https://taskfile.dev/install.sh | sh
- name: Build using Taskfile.yml
run: ./bin/task release
- uses: actions/upload-artifact@v2
with:
name: compiled-application-amd64-ubuntu
path: out/*
- uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
out/update_linux_amd64
out/update_linux_arm
out/update_windows_amd64.exe
draft: true
name: Release ${{ github.ref }}
body: |
Changes in this Release
- First Change
- Second Change
- [ ] You've listed all important changes / pull requests
12 changes: 11 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
# Building the application
FROM golang:1.16-alpine

RUN apk add curl yarn && sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /bin
# Installing dependencies
RUN apk add curl git yarn && sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /bin
WORKDIR /go/src/tldrprogress

# Caching go packages
COPY go.mod go.sum ./
RUN go mod download

# Caching yarn packages
COPY resources/package.json resources/yarn.lock resources/
RUN cd resources && yarn

# Building the application
COPY . .
RUN /bin/task build

Expand Down
3 changes: 3 additions & 0 deletions resources/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "react-app"
}
3 changes: 3 additions & 0 deletions resources/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ yarn-error.log*

# Custom data.json file for testing
public/data.json

# Vercel
.vercel
3 changes: 3 additions & 0 deletions resources/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vercel
build
public/data.json
5 changes: 5 additions & 0 deletions resources/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 100,
"semi": false,
"singleQuote": true
}
27 changes: 27 additions & 0 deletions resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,39 @@ In the project directory, you can run:

### `yarn start`

**Note**: Please run `yarn data` once to set up your development environment.

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `yarn format`

Formats the code using [Prettier](https://prettier.io/).
Please run this command before committing.

_Configuration files:
[`.prettierignore`](.prettierignore),
[`.prettierrc.json`](.prettierrc.json)_

### `yarn lint`

Lints the code using [Prettier](https://prettier.io/) and [ESLint](https://eslint.org/).
This command is run as part of the CI process.

_Configuration files:
[`.eslintrc`](.eslintrc),
[`.prettierignore`](.prettierignore),
[`.prettierrc.json`](.prettierrc.json)_

### `yarn data`

Downloads the latest `data.json` file from the [`tldri18n`](https://github.com/LukWebsForge/tldri18n) repository.
It contains the information which is being displayed by this front end.
The file will be ignored by Git.

### `yarn test`

Launches the test runner in the interactive watch mode.\
Expand Down
10 changes: 0 additions & 10 deletions resources/craco.config.js

This file was deleted.

20 changes: 20 additions & 0 deletions resources/grep-data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const http = require('https')
const fs = require('fs')

// Inspiration: https://stackoverflow.com/a/17676794/4106848

const destination = 'public/data.json'
const url = 'https://raw.githubusercontent.com/LukWebsForge/tldri18n/main/data.json'

const file = fs.createWriteStream(destination)
http
.get(url, (response) => {
response.pipe(file)
file.on('finish', () => {
file.close()
console.log(destination + ' was downloaded successfully')
})
})
.on('error', (err) => {
console.log('Error while downloading ' + destination + ': ' + err)
})
4 changes: 4 additions & 0 deletions resources/logo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Favicon

- The SVG image uses the font family [Inter](https://rsms.me/inter/)
- You can create a `favicon.ico` using [icoconverter.com](https://www.icoconverter.com/)
113 changes: 113 additions & 0 deletions resources/logo/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit db68a05

Please sign in to comment.