Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
yerTools committed May 23, 2024
1 parent 047684b commit 59ae6ac
Show file tree
Hide file tree
Showing 13 changed files with 254 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
insert_final_newline = true
end_of_line = lf
indent_style = space
indent_size = 2
max_line_length = 80
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: test

on:
push:
branches: []
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: erlef/setup-beam@v1
with:
otp-version: "26.0.2"
gleam-version: "1.1.0"
rebar3-version: "3"

- uses: actions/setup-node@v4
with:
node-version: 18.x
cache: "npm"

- run: gleam deps download
- run: gleam test --target erlang
- run: gleam test --target javascript
- run: gleam format --check src test
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.beam
*.ez
/build
erl_crash.dump
35 changes: 35 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"arrowParens": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"cursorOffset": -1,
"dataTypeCase": "upper",
"denseOperators": false,
"dialect": "sqlite",
"embeddedLanguageFormatting": "auto",
"endOfLine": "lf",
"experimentalTernaries": true,
"expressionWidth": 80,
"functionCase": "upper",
"htmlWhitespaceSensitivity": "css",
"identifierCase": "preserve",
"indentStyle": "standard",
"insertPragma": false,
"jsxSingleQuote": false,
"keywordCase": "upper",
"language": "sqlite",
"linesBetweenQueries": 2,
"logicalOperatorNewline": "after",
"newlineBeforeSemicolon": false,
"overrides": [],
"printWidth": 80,
"proseWrap": "always",
"quoteProps": "consistent",
"requirePragma": false,
"semi": true,
"singleAttributePerLine": false,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false
}
11 changes: 11 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"github.vscode-github-actions",
"gleam.gleam",
"pgourlain.erlang",
"streetsidesoftware.code-spell-checker",
"supertsy5.line-length-checker-vscode",
"tyriar.sort-lines"
]
}
46 changes: 46 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"cSpell.language": "en",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"files.eol": "\n",
"git.autofetch": true,
"line-length-checker.blacklist": ["*.md"],
"line-length-checker.level": "Info",
"line-length-checker.lineLength": 80,
"prettier.arrowParens": "always",
"prettier.bracketSameLine": false,
"prettier.bracketSpacing": true,
"prettier.configPath": ".prettierrc",
"prettier.embeddedLanguageFormatting": "auto",
"prettier.enable": true,
"prettier.enableDebugLogs": false,
"prettier.endOfLine": "lf",
"prettier.htmlWhitespaceSensitivity": "css",
"prettier.ignorePath": ".prettierignore",
"prettier.insertPragma": false,
"prettier.jsxSingleQuote": false,
"prettier.prettierPath": "",
"prettier.printWidth": 80,
"prettier.proseWrap": "always",
"prettier.quoteProps": "consistent",
"prettier.requireConfig": true,
"prettier.requirePragma": false,
"prettier.resolveGlobalModules": false,
"prettier.semi": true,
"prettier.singleAttributePerLine": false,
"prettier.singleQuote": false,
"prettier.tabWidth": 2,
"prettier.trailingComma": "all",
"prettier.useEditorConfig": true,
"prettier.useTabs": false,
"prettier.vueIndentScriptAndStyle": false,
"prettier.withNodeModules": false,
"sortLines.filterBlankLines": true,
"[erlang]": {
"editor.defaultFormatter": "pgourlain.erlang"
},
"[gleam]": {
"editor.defaultFormatter": "gleam.gleam"
},
"cSpell.words": ["immutype"]
}
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# WORK IN PROGRESS!

# immutype_lite

[![Package Version](https://img.shields.io/hexpm/v/immutype_lite)](https://hex.pm/packages/immutype_lite)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/immutype_lite/)

```sh
gleam add immutype_lite
```

```gleam
import immutype_lite
pub fn main() {
// TODO: An example of the project in use
}
```

Further documentation can be found at <https://hexdocs.pm/immutype_lite>.

## Development

```sh
gleam run # Run the project
gleam test # Run the tests
gleam shell # Run an Erlang shell
```
19 changes: 19 additions & 0 deletions gleam.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name = "immutype_lite"
version = "1.0.0"

description = "WORK IN PROGRESS!"

licences = ["MIT"]
repository = { type = "github", user = "yerTools", repo = "immutype_lite" }

target = "erlang"
gleam = ">= 1.0.0"

[dependencies]
gleam_stdlib = ">= 0.34.0 and < 2.0.0"
gleam_erlang = ">= 0.25.0 and < 1.0.0"
event_hub = ">= 1.0.0 and < 2.0.0"
sqlight = ">= 0.9.0 and < 1.0.0"

[dev-dependencies]
gleeunit = ">= 1.0.0 and < 2.0.0"
18 changes: 18 additions & 0 deletions manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file was generated by Gleam
# You typically do not need to edit this file

packages = [
{ name = "esqlite", version = "0.8.8", build_tools = ["rebar3"], requirements = [], otp_app = "esqlite", source = "hex", outer_checksum = "374902457C7D94DC9409C98D3BDD1CA0D50A60DC9F3BDF1FD8EB74C0DCDF02D6" },
{ name = "event_hub", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_stdlib"], otp_app = "event_hub", source = "hex", outer_checksum = "1595E4968A311167B9A60DF2A2EA9CA462D78F133B0878930BD5AB29007B993A" },
{ name = "gleam_erlang", version = "0.25.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_erlang", source = "hex", outer_checksum = "054D571A7092D2A9727B3E5D183B7507DAB0DA41556EC9133606F09C15497373" },
{ name = "gleam_stdlib", version = "0.37.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "5398BD6C2ABA17338F676F42F404B9B7BABE1C8DC7380031ACB05BBE1BCF3742" },
{ name = "gleeunit", version = "1.1.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "72CDC3D3F719478F26C4E2C5FED3E657AC81EC14A47D2D2DEBB8693CA3220C3B" },
{ name = "sqlight", version = "0.9.0", build_tools = ["gleam"], requirements = ["esqlite", "gleam_stdlib"], otp_app = "sqlight", source = "hex", outer_checksum = "2D9C9BA420A5E7DCE7DB2DAAE4CAB0BE6218BEB48FD1531C583550B3D1316E94" },
]

[requirements]
event_hub = { version = ">= 1.0.0 and < 2.0.0" }
gleam_erlang = { version = ">= 0.25.0 and < 1.0.0" }
gleam_stdlib = { version = ">= 0.34.0 and < 2.0.0" }
gleeunit = { version = ">= 1.0.0 and < 2.0.0" }
sqlight = { version = ">= 0.9.0 and < 1.0.0"}
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "immutype_lite",
"version": "1.0.0",
"description": "WORK IN PROGRESS!",
"directories": {
"test": "test"
},
"scripts": {
"test": "gleam test --target javascript && gleam test --target erlang"
},
"repository": {
"type": "git",
"url": "git+https://github.com/yerTools/immutype_lite.git"
},
"keywords": [
"erlang",
"gleam",
"javascript"
],
"author": "Felix Mayer",
"license": "MIT",
"bugs": {
"url": "https://github.com/yerTools/immutype_lite/issues"
},
"homepage": "https://github.com/yerTools/immutype_lite#readme"
}
5 changes: 5 additions & 0 deletions src/immutype_lite.gleam
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import gleam/io

pub fn main() {
io.println("Hello from immutype_lite!")
}
12 changes: 12 additions & 0 deletions test/immutype_lite_test.gleam
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import gleeunit
import gleeunit/should

pub fn main() {
gleeunit.main()
}

// gleeunit test functions end in `_test`
pub fn hello_world_test() {
1
|> should.equal(1)
}

0 comments on commit 59ae6ac

Please sign in to comment.