commit fe0f8d0cd64a2d8c06ec6e0a75f1ff0b721c7c4b Author: thunderstrike <> Date: Sun Nov 26 19:27:42 2023 +0000 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ebf58ad --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +/bower_components/ +/node_modules/ +/.pulp-cache/ +/output/ +/generated-docs/ +/.psc-package/ +/.psc* +/.purs* +/.psa* +/.spago +.log +.purs-repl +.env diff --git a/.prettierrc.cjs b/.prettierrc.cjs new file mode 100644 index 0000000..b8e1fd1 --- /dev/null +++ b/.prettierrc.cjs @@ -0,0 +1,8 @@ +module.exports = { + tabWidth: 2, + trailingComma: 'all', + singleQuote: true, + semi: false, + arrowParens: 'avoid', + plugins: [], +} diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..598836b --- /dev/null +++ b/.tool-versions @@ -0,0 +1,3 @@ +bun 1.0.11 +purescript 0.15.12 +nodejs 20.9.0 diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000..c42d05c Binary files /dev/null and b/bun.lockb differ diff --git a/bun/fmt.js b/bun/fmt.js new file mode 100644 index 0000000..04b5c40 --- /dev/null +++ b/bun/fmt.js @@ -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)) diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..f48b93c --- /dev/null +++ b/jsconfig.json @@ -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"] +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..e446309 --- /dev/null +++ b/package.json @@ -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": {} +} diff --git a/spago.yaml b/spago.yaml new file mode 100644 index 0000000..a8c16f6 --- /dev/null +++ b/spago.yaml @@ -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= diff --git a/src/Main.purs b/src/Main.purs new file mode 100644 index 0000000..ee561ac --- /dev/null +++ b/src/Main.purs @@ -0,0 +1,7 @@ +module Main where + +import Prelude +import Effect (Effect) + +main :: Effect Unit +main = pure unit