Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 = (

Hello World!



)

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)