git.iko.soy/rowtype-yoga/purslint
on main help sign in
Update README for Node-based build and demo video.
e248083Mark
README.md+20−26
@@ -1,6 +1,11 @@
1# PureLint
1# PureLint
2
2
3+<p align="center">
3−![Purslint logo](vscode-extension/purslint.jpg)
4+ <img src="vscode-extension/purslint.jpg" alt="Purslint logo" width="180" />
5+</p>
6+<p align="center">
7+ <video src="demo.mp4" width="480" controls playsinline></video>
8+</p>
4
9
5A PureScript linter inspired by [hlint](https://github.com/ndmitchell/hlint), providing suggestions for cleaner, more idiomatic PureScript code.
10A PureScript linter inspired by [hlint](https://github.com/ndmitchell/hlint), providing suggestions for cleaner, more idiomatic PureScript code.
6
11
@@ -25,33 +30,19 @@ purelint --help
25
30
26- [PureScript](https://www.purescript.org/) compiler (`purs`)
31- [PureScript](https://www.purescript.org/) compiler (`purs`)
27- [Spago](https://github.com/purescript/spago) package manager
32- [Spago](https://github.com/purescript/spago) package manager
28−- [Go](https://golang.org/) 1.19+
33+- [Node.js](https://nodejs.org/) 18+
29−- [psgo](https://github.com/puregocore/psgo) - PureScript to Go compiler
30
34
31### Building
35### Building
32
36
33```bash
37```bash
34# Install dependencies
38# Install dependencies
35−spago install
39+npm install
36−
40+
37−# Build CLI
41+# Build and bundle CLI + LSP
38−purs compile --codegen corefn 'lib/**/*.purs' 'bin/purslint-cli/**/*.purs' '.spago/**/*.purs'
42+npm run dist
39−psgo output/*/corefn.json
43+
40−cp output/Main/Main.go main_cli.go
41−go build -o purelint main_cli.go
42−
43−# Build LSP
44−purs compile --codegen corefn 'lib/**/*.purs' 'bin/purslint-lsp/**/*.purs' '.spago/**/*.purs'
45−psgo output/*/corefn.json
46−cp output/Main/Main.go main_lsp.go
47−go build -o purelint-lsp main_lsp.go
48−
49−# Build and run tests
44+# Run tests
50−purs compile --codegen corefn 'lib/**/*.purs' 'test/**/*.purs' '.spago/**/*.purs'
51−psgo output/*/corefn.json
52−cp output/Test.Main/Test_Main.go test_main.go
53−go build -o test-runner test_main.go
54−./test-runner
45+npm test
55```
46```
56
47
57## Usage
48## Usage
@@ -118,11 +109,12 @@ Create a `purelint.json` file in your project root:
118
109
119## Architecture
110## Architecture
120
111
121−PureLint is written in PureScript and compiled to Go using `psgo` (purescript-native). This allows:
112+PureLint is written in PureScript and compiled to JavaScript via
113+`purs-backend-es`, then bundled for Node.js. This allows:
122
114
123- Full access to the PureScript CST parser (`purescript-language-cst-parser`)
115- Full access to the PureScript CST parser (`purescript-language-cst-parser`)
124−- Native binary performance
116+- Straightforward distribution via npm
125−- Easy distribution without runtime dependencies
117+- A single runtime across CLI and LSP
126
118
127### Project Structure
119### Project Structure
128
120
@@ -162,6 +154,8 @@ via the workflow dispatch.
162
154
163- `purescript-language-cst-parser` - PureScript CST parser
155- `purescript-language-cst-parser` - PureScript CST parser
164- `purescript-lsp` - LSP protocol implementation (Go FFI)
156- `purescript-lsp` - LSP protocol implementation (Go FFI)
157+- `purs-backend-es` - PureScript to JavaScript backend
158+- `esbuild` - Bundler for CLI and LSP
165
159
166## License
160## License
167
161
demo.mp4new file

Binary file not shown.