Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2915a42
Showing
9 changed files
with
161 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Grader.JS | ||
|
||
Grader.JS, or just **Grader**, is a tool to help you build cross-platform desktop apps in JavaScript, HTML and CSS, without the bloat of Electron. | ||
|
||
# Get Started | ||
|
||
Use npm to create a new Grader app like so: | ||
|
||
```sh | ||
mkdir my-app | ||
cd my-app | ||
# make it git | ||
git init | ||
# make it grader | ||
npm i graderjs | ||
``` | ||
|
||
And the [Grader.JS tool](https://github.com/c9fe/graderjs) will automatically populate your repo. | ||
|
||
Then, read the [getting started guide](https://github.com/c9fe/grader-base/blob/master/README.md) or see below for an API reference. | ||
|
||
# API reference | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Flags | ||
|
||
## Localstorage and multiple windows | ||
|
||
If you want localstorage you need to pick persistent session storage. If you do this, you can only have one app window. | ||
|
||
If you want to open multiple app windows, they are all temporary and transient and you cannot rely on local storage. | ||
|
||
### Why | ||
|
||
This is the case because, Chrome, running with more than one window, and each window having RDP on different ports cannot share the same user data directory. In order to run multiple windows, each window/chrome needs to have its own user data directory. So if you want multiple windows, we need to create them transiently and delete them. If you want persistent localstorage (but hey you can use filesystem since you have node), you must accept one window only. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "graderjs", | ||
"version": "2.1.0", | ||
"description": "Tool to copy the Grader.JS base repo into the current directory", | ||
"scripts": { | ||
"postinstall": "bash ./scripts/bring_grader.sh" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/c9fe/graderjs.git" | ||
}, | ||
"keywords": [ | ||
"devtools", | ||
"node", | ||
"hybrid", | ||
"desktop", | ||
"template", | ||
"electron", | ||
"sciter", | ||
"gradebr", | ||
"cross-platform apps", | ||
"chromium", | ||
"chrome" | ||
], | ||
"author": "@dosy", | ||
"license": "AGPL-3.0", | ||
"bugs": { | ||
"url": "https://github.com/c9fe/graderjs/issues" | ||
}, | ||
"homepage": "https://github.com/c9fe/graderjs#readme", | ||
"dependencies": {}, | ||
"devDependencies": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
echo "Making it Grader-ified..." | ||
|
||
git clone https://github.com/c9fe/grader-base.git | ||
cp -r grader-base/* . | ||
|
||
npm i | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
- verify window control buttons work | ||
- add a build step that zips up our website / app directory | ||
- add the website zip into the nexe build | ||
- write the server.js and website zip to a temp directory | ||
- unzip the website zip | ||
- start the server | ||
- refactor to have app as a launch process for a fatter server. app closes quickly, leaving no trace of console. | ||
- test this on windows and linux (ubuntu vnc) | ||
- clean up code and remove most of it | ||
- Decide how to handle config, names, folders of different apps | ||
- perf: try keeping the chrome profile dir (per app), and experiment with cache dir as temp or persistent. Also try opening chrome earlier and using DevTools if needed as fallback to make it load the UI | ||
- global $HOME/.grader directory for all grader apps, installs and configs | ||
- handle picking a random port that's available | ||
- work out how to delete the session directories on windows | ||
- make it into a great API and clean the code | ||
- ensure all sessions are correctly accounted for (seems at least 1 window will not be saved in old session log, need to work out why) | ||
- create API bridge plumbing! | ||
- remove bugs about adding binding/related code twice | ||
- work out that trying make window controls top bar available (for systems that don't use them, like ubuntu) is actually an error because ubuntu does provide them, and trying to provide on ourselves (using app region drag) doesn't work. But be grateful that I got all the plumbing for the API bridge done! YAY | ||
- implement way to pass back info from service side to UI side (promise resolver account) | ||
- allow setting initial position and size (and get screen size by opening headless chrome window and evaluating screen.width, everytime. We can also use this headless vanguard to provide us other useful properties.) | ||
- improve way to get screen coorindates (faster and less waste, let's try to keep these two browsers using the same session directories) | ||
- get rid of console window opening on browser exit / shutdown process | ||
- implement addHandlers, server and keepConsoleOpen settings (as well as other sketched and unimplemented settings) | ||
- add download_chrome script to pull it in if system doesn't have it | ||
- this can be an npm repo | ||
- call a function {install} and depending on win, nix or osx download the right installer and run it | ||
- multiple windows handling | ||
- fix bug where service doesnt' close after last UI closed (because 'headless' still there) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Icons | ||
- add ability to create dmg and add icon, add ability to create windows icon, and mac icon. | ||
|
||
differentiate from pkg and nexe via: | ||
- support .node imports (binaries natives) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
I think it's easier to make it like a create-app or a template repo. | ||
|
||
Because ... | ||
|
||
To have these apps an author needs 2 parts: | ||
|
||
1) Grader API and code | ||
2) Build their code into a binary | ||
|
||
And 2 requires | ||
|
||
3) Correct structure of their code | ||
|
||
There could be a post install script, that sets up 3. | ||
|
||
And also copies all the required build scripts. | ||
|
||
And also sets up their config. | ||
|
||
This is an option. | ||
|
||
--- but | ||
|
||
|
||
I think at the start, it's easier just to make it a template repository. | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Priority | ||
- put archivist in this framework. | ||
- improve API based on what I learned from porting and | ||
- write documentation about how to use grader to build cross-platform apps | ||
|
||
Lesser | ||
- implement apiInUI flag | ||
- improve progress . metrics (no clearline just add 1 dot on each turn using stdout.write) | ||
- add sessionIds to old-sessions on every exit path from the app (even before UI launched for example) | ||
- fix it so we ALWAYS (no matter what) delete old sessions | ||
- add security checks on origin for API proxy | ||
|
||
|
||
|
||
|
||
|