Skip to content

Commit

Permalink
Version 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
seroperson committed May 3, 2024
1 parent e5e9d9e commit 8167287
Show file tree
Hide file tree
Showing 18 changed files with 6,573 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-all:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Java version
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '17'
- name: Check code format
uses: jrouly/scalafmt-native-action@v1
with:
version: "3.8.1"
arguments: "-c .scalafmt.conf --test example urlopt4s"
- uses: actions/setup-node@v4
with:
node-version: '21'
cache: 'npm'
cache-dependency-path: urlopt4s-js/package-lock.json
- name: Install dependencies
run: cd urlopt4s-js && npm install webpack-cli --save-dev
- name: Compile urlopt4s-js
run: cd urlopt4s-js && npm exec webpack
- name: Moving bundle
run: mv urlopt4s-js/dist/main-bundle.mjs urlopt4s/resources/urlopt4s.mjs
- uses: jodersky/setup-mill@v0.3.0
with:
mill-version: 0.11.7
- name: Compile
run: mill '__.compile'
- name: Test
run: mill '__.test'
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# scala
out/
.bsp/
.metals/
.bloop/

# ide
.idea/

# js
node_modules/
dist/

# compiled js bundle
urlopt4s/resources/urlopt4s.mjs
1 change: 1 addition & 0 deletions .mill-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.11.7
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Allows .md wrapping
proseWrap: always

69 changes: 69 additions & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
version = 3.8.1

maxColumn = 80

runner.dialect = scala213source3
preset = default

indent.main = 2
indent.defnSite = 2
indent.caseSite = 2
indent.extendSite = 2
indent.withSiteRelativeToExtends = 2
indent.extraBeforeOpenParenDefnSite = 2

indentOperator.exemptScope = all

align.preset = none

newlines.source = unfold
newlines.topLevelStatementBlankLines = [
{
blanks = 1
}
]
newlines.beforeTemplateBodyIfBreakInParentCtors = true
newlines.beforeMultiline = fold
newlines.beforeCurlyLambdaParams = multilineWithCaseOnly
newlines.selectChains = unfold
newlines.afterCurlyLambdaParams = squash
newlines.implicitParamListModifierForce = [after]
newlines.avoidForSimpleOverflow = [punct]
newlines.avoidInResultType = true
newlines.sometimesBeforeColonInMethodReturnType = false
newlines.inInterpolation = oneline

danglingParentheses.tupleSite = true

runner.optimizer.forceConfigStyleMinSpan = 50
runner.optimizer.forceConfigStyleMinArgCount = 1

rewrite.rules = [
AvoidInfix,
RedundantBraces,
RedundantParens,
SortModifiers,
PreferCurlyFors,
Imports
]
rewrite.redundantBraces.methodBodies = true
rewrite.redundantBraces.includeUnitMethods = false
rewrite.redundantBraces.ifElseExpressions = true
rewrite.redundantBraces.stringInterpolation = true
rewrite.imports.expand = true
rewrite.imports.sort = scalastyle

docstrings.style = Asterisk
docstrings.removeEmpty = true
docstrings.oneline = unfold
docstrings.blankFirstLine = true
docstrings.forceBlankLineBefore = true

xmlLiterals.assumeFormatted = true

rewriteTokens = {
"⇒": "=>"
"→": "->"
"←": "<-"
}

Loading

0 comments on commit 8167287

Please sign in to comment.