Initial commit

This commit is contained in:
thunderstrike 2023-11-18 20:10:40 +00:00
commit 32c6cdc4a2
9 changed files with 113 additions and 0 deletions

13
.gitignore vendored Normal file
View File

@ -0,0 +1,13 @@
/bower_components/
/node_modules/
/.pulp-cache/
/output/
/generated-docs/
/.psc-package/
/.psc*
/.purs*
/.psa*
/.spago
.log
.purs-repl
.env

8
.prettierrc.cjs Normal file
View File

@ -0,0 +1,8 @@
module.exports = {
tabWidth: 2,
trailingComma: 'all',
singleQuote: true,
semi: false,
arrowParens: 'avoid',
plugins: [],
}

3
.tool-versions Normal file
View File

@ -0,0 +1,3 @@
bun 1.0.11
purescript 0.15.12
nodejs 20.9.0

BIN
bun.lockb Executable file

Binary file not shown.

27
bun/fmt.js Normal file
View File

@ -0,0 +1,27 @@
/** @type {(parser: string, ps: string[]) => import("bun").Subprocess} */
const prettier = (parser, ps) =>
Bun.spawn(['bun', 'x', 'prettier', '--write', '--parser', parser, ...ps], {
stdout: 'inherit',
stderr: 'inherit',
})
const procs = [
prettier('babel', ['./src/**/*.js', './bun/**/*.js', './.prettierrc.cjs']),
prettier('json', ['./package.json', './jsconfig.json']),
Bun.spawn(
[
'bun',
'x',
'purs-tidy',
'format-in-place',
'src/**/*.purs',
'test/**/*.purs',
],
{
stdout: 'inherit',
stderr: 'inherit',
},
),
]
await Promise.all(procs.map(p => p.exited))

16
jsconfig.json Normal file
View File

@ -0,0 +1,16 @@
{
"compilerOptions": {
"types": ["bun-types"],
"lib": ["esnext"],
"target": "esnext",
"module": "esnext",
"moduleResolution": "bundler",
"moduleDetection": "force",
"jsx": "react",
"allowJs": true,
"checkJs": true,
"noEmit": true,
"strict": true
},
"include": ["src/**/*.js", "bun/**/*.js"]
}

18
package.json Normal file
View File

@ -0,0 +1,18 @@
{
"name": "purs",
"private": true,
"module": "index.js",
"type": "module",
"scripts": {
"fmt": "bun bun/fmt.js"
},
"devDependencies": {
"bun-types": "1.0.11",
"purs-tidy": "^0.10.0",
"spago": "next"
},
"peerDependencies": {
"typescript": "^5.0.0"
},
"dependencies": {}
}

21
spago.yaml Normal file
View File

@ -0,0 +1,21 @@
package:
dependencies:
- prelude
- aff
- effect
- either
- maybe
- foldable-traversable
- console
- newtype
- strings
- stringutils
- transformers
- tuples
- typelevel-prelude
name: project
workspace:
extra_packages: {}
package_set:
url: https://raw.githubusercontent.com/purescript/package-sets/psc-0.15.10-20230930/packages.json
hash: sha256-nTsd44o7/hrTdk0c6dh0wyBqhFFDJJIeKdQU6L1zv/A=

7
src/Main.purs Normal file
View File

@ -0,0 +1,7 @@
module Main where
import Prelude
import Effect (Effect)
main :: Effect Unit
main = pure unit