https://github.com/4cecoder/twanspiwer
wyte your weact cowd im uwu
https://github.com/4cecoder/twanspiwer
go nodejs react transpiler uwu
Last synced: about 1 year ago
JSON representation
wyte your weact cowd im uwu
- Host: GitHub
- URL: https://github.com/4cecoder/twanspiwer
- Owner: 4cecoder
- License: mit
- Created: 2023-02-16T19:58:25.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-17T22:09:06.000Z (about 3 years ago)
- Last Synced: 2025-01-05T16:30:07.918Z (about 1 year ago)
- Topics: go, nodejs, react, transpiler, uwu
- Language: Go
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 👉uwu👈 Twanspiwer
A package that uses uwu keywords as an alternative syntax for React.
Creating a transpiler to convert regular code to uwu language would require a lot of complex programming and natural language processing.
## Usage:
### Pwewequisites
Golang needs to be installed.
### Installation
Cwone the pwoject:
`git clone https://github.com/4cecoder/twanspiwer` or `gh repo clone 4cecoder/twanspiwer`
## get depenwencies
## `cd twanspiwer && go mod tidy`
## Wun the twanspiwer
```shell
go run main.go -input=react-code-with-uwu.js -output=react-code-without-uwu.js
```
## How it works
To transpile a React code with uwu keywords using the key-value pairs in a `uwu.json` file:
1. Read the `uwu.json` file and store its contents in a Go map.
2. Read the React code from a `react-code.js` file.
3. Replace all the uwu keywords with the React keywords using `strings.ReplaceAll`.
4. Write the transpiled code to a new file named `transpiled-code.js`.
## Running the transpiler
```shell
go run main.go -input=react-code-with-uwu.js -output=react-code-without-uwu.js
```