Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aligator/dev
Source for aligator.dev
https://github.com/aligator/dev
Last synced: 7 days ago
JSON representation
Source for aligator.dev
- Host: GitHub
- URL: https://github.com/aligator/dev
- Owner: aligator
- Created: 2021-04-01T15:01:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-21T16:08:55.000Z (over 1 year ago)
- Last Synced: 2024-05-21T05:01:06.694Z (6 months ago)
- Language: TypeScript
- Size: 8.79 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aligator.dev
This is the source of my website [aligator.dev](https://aligator.dev).
It is built using just some dev-dependencies like typescript, html and scss. No React, no Vue, no jquery, no etc.As typescript itself already provides JSX transpilation, I use just that to build plain dom elements.
However note that this is highly experimental!So instead of something like this:
```ts
const div = document.createElement('div')
div.innerHTML = `
Hello World!
`
const consoleContainer = document.getElementById('console-container')
consoleContainer.append(div)
```
I can use:
```tsx
const div = (
)const consoleContainer = document.getElementById('console-container')
consoleContainer.append(...div.children)
```
And this with only typescript as (dev)-dependency which I use anyway.The needed "glue" code (which is really not that much) for that resides in `src/plainJSX` and typescript needs to know about it by using this config:
```json
{
"compilerOptions": {
...
"jsx": "react",
"jsxFactory": "PlainJSX.createElement",
"jsxFragmentFactory": "PlainJSX.Fragment",
},
...
}
```## Commands
As the website consists of just a virtual terminal, you can type `help`.## GoSlice
I also experiment a bit with Golang to webassembly. That's why it is possible to run
[GoSlice](https://github.com/aligator/goslice) in your browser. Just call `goslice gopher.stl`
Note that the repo includes a pre-built webassembly version. If you compile it with `yarn build:go` you have to make sure that the file `public/js/wasm_exec.js` matches your used Go version. You can get it from [here (use a matching branch)](https://github.com/golang/go/blob/master/misc/wasm/wasm_exec.js)# Related
My other projects which are used on this page:
* [GoSlice](https://github.com/aligator/GoSlice) An experimental stl-file slicer written in Go
* [gcode-viewer](https://github.com/aligator/gcode-viewer) A simple GCode viewer made for GoSlice (but may read other GCode also)