my page ollie.earth
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

initial

nnuuvv 2233e068

+158
+23
.github/workflows/test.yml
··· 1 + name: test 2 + 3 + on: 4 + push: 5 + branches: 6 + - master 7 + - main 8 + pull_request: 9 + 10 + jobs: 11 + test: 12 + runs-on: ubuntu-latest 13 + steps: 14 + - uses: actions/checkout@v4 15 + - uses: erlef/setup-beam@v1 16 + with: 17 + otp-version: "28" 18 + gleam-version: "1.14.0" 19 + rebar3-version: "3" 20 + # elixir-version: "1" 21 + - run: gleam deps download 22 + - run: gleam test 23 + - run: gleam format --check src test
+4
.gitignore
··· 1 + *.beam 2 + *.ez 3 + /build 4 + erl_crash.dump
+24
README.md
··· 1 + # page 2 + 3 + [![Package Version](https://img.shields.io/hexpm/v/page)](https://hex.pm/packages/page) 4 + [![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/page/) 5 + 6 + ```sh 7 + gleam add page@1 8 + ``` 9 + ```gleam 10 + import page 11 + 12 + pub fn main() -> Nil { 13 + // TODO: An example of the project in use 14 + } 15 + ``` 16 + 17 + Further documentation can be found at <https://hexdocs.pm/page>. 18 + 19 + ## Development 20 + 21 + ```sh 22 + gleam run # Run the project 23 + gleam test # Run the tests 24 + ```
+32
flake.nix
··· 1 + { 2 + description = "page dev env"; 3 + 4 + inputs = { 5 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 + utils.url = "github:numtide/flake-utils"; 7 + }; 8 + 9 + outputs = { self, nixpkgs, utils }: 10 + utils.lib.eachDefaultSystem (system: 11 + let 12 + pkgs = import nixpkgs { inherit system; }; 13 + in 14 + { 15 + devShells.default = pkgs.mkShell { 16 + buildInputs = with pkgs; [ 17 + gleam 18 + erlang_28 19 + rebar3 20 + bun 21 + just 22 + ]; 23 + 24 + shellHook = '' 25 + echo "page dev env loaded" 26 + just --list 27 + echo "Use just to run them." 28 + ''; 29 + }; 30 + }); 31 + } 32 +
+25
gleam.toml
··· 1 + name = "doodler" 2 + version = "1.0.0" 3 + target = "javascript" 4 + 5 + # Fill out these fields if you intend to generate HTML documentation or publish 6 + # your project to the Hex package manager. 7 + # 8 + # description = "" 9 + # licences = ["Apache-2.0"] 10 + # repository = { type = "github", user = "", repo = "" } 11 + # links = [{ title = "Website", href = "" }] 12 + # 13 + # For a full reference of all the available options, you can have a look at 14 + # https://gleam.run/writing-gleam/gleam-toml/. 15 + 16 + [javascript] 17 + runtime = "bun" 18 + 19 + [dependencies] 20 + gleam_stdlib = ">= 0.44.0 and < 2.0.0" 21 + lustre = ">= 5.3.5 and < 6.0.0" 22 + 23 + [dev-dependencies] 24 + gleeunit = ">= 1.0.0 and < 2.0.0" 25 + lustre_dev_tools = ">= 2.1.3 and < 3.0.0"
+32
justfile
··· 1 + default: 2 + @just --list 3 + 4 + # Run a dev server using lustre/dev start 5 + dev: 6 + gleam run -m lustre/dev start 7 + 8 + # Build the SPA 9 + build: 10 + gleam run -m lustre/dev build 11 + 12 + 13 + roll-back: 14 + # move copy from /srv/doodler/previous to /srv/doodler/ 15 + ssh deploy-doodler@gitlab "cp /srv/doodler/previous/* /srv/doodler/" 16 + 17 + # Deploy doodler to my server 18 + deploy: build 19 + #!/bin/zsh 20 + ssh deploy-doodler@gitlab " 21 + # ignore errors since the following 2 steps would otherwise have issues 22 + set +e 23 + # create copy of previous version in /srv/doodler/previous 24 + cp /srv/doodler/* /srv/doodler/previous 25 + # remove previous version -- /srv/doodler/previous will be ignored 26 + rm /srv/doodler/* 27 + " 28 + 29 + # copy current version to /srv/doodler/ 30 + scp ./dist/* deploy-doodler@gitlab:/srv/doodler 31 + 32 +
+5
src/page.gleam
··· 1 + import gleam/io 2 + 3 + pub fn main() -> Nil { 4 + io.println("Hello from page!") 5 + }
+13
test/page_test.gleam
··· 1 + import gleeunit 2 + 3 + pub fn main() -> Nil { 4 + gleeunit.main() 5 + } 6 + 7 + // gleeunit test functions end in `_test` 8 + pub fn hello_world_test() { 9 + let name = "Joe" 10 + let greeting = "Hello, " <> name <> "!" 11 + 12 + assert greeting == "Hello, Joe!" 13 + }