https://github.com/squaresapp/rawjs-sample
Sample project to demonstrate the simplicity of RawJS projects.
https://github.com/squaresapp/rawjs-sample
Last synced: about 1 year ago
JSON representation
Sample project to demonstrate the simplicity of RawJS projects.
- Host: GitHub
- URL: https://github.com/squaresapp/rawjs-sample
- Owner: squaresapp
- Created: 2023-12-22T05:35:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-22T15:05:41.000Z (over 2 years ago)
- Last Synced: 2025-04-15T04:59:36.694Z (about 1 year ago)
- Language: TypeScript
- Size: 12.7 KB
- Stars: 46
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Minimal RawJS Project
This repository demonstrates a minimal RawJS project setup. You can clone this repository in order to get a good starting point for a front-end project using RawJS.
The project demonstrates basic app development and project organization using RawJS, hierarchial routing with support for back and forward buttons (via [Rawter](https://github.com/paul-go/rawter)), `vite` as the build server, and a code-workspace configured for debugging. Be sure to open the code-workspace file into VS code in order to get step debugging to work.
## Online Demo
The demo project is basic CSS color viewer. You can see an online demo of the project at
[https://rawjssample.pages.dev](https://rawjssample.pages.dev)
## Trade-offs
These are the limitations you need to accept with this project structure:
- You have to use TypeScript (duh)
- You have to be disciplined to only use dependencies that are published on jsdelivr (`npm install` programmers need to clean up their act)
These are the advantages you gain:
- Efficient one-class-per file project structure
- No `import` dumpster at the top of each file. Forget imports even existed. Just access whatever you want, wherever you want. TypeScript knows where to find it.
- TypeScript namespaces provide arguably better encapsulation than ES modules.
- No bundler, no build system. Near-zero complexity.
- TypeScript builds your app in milliseconds, even if your app gets huge.