Important
When you're done reading this file, just replace its content with some of your own. You don't need a README, but it would be fun.
The built-in app template for ArcOS v6
Important
When renaming variables, functions or objects, use F2 to rename it, this prevents broken imports. After renaming, check for unsaved files.
Before doing anything else, change this stuff:
- The name of the class in runtime.ts to a unique name (preferrably using the ID of the app)
- The name and data of the object in app.ts to the properties of the app (use F2 to rename the object)
- The contents of this README file (after you're done reading it ofcourse)
Well, begin writing your application! Use references from the parent codebase to access stuff like the File System. One thing though, try to put all the logic in the Runtime class instead of in global files. Otherwise it could interfere with the whole PIDs thing. This does mean that the Runtime will become quite big, oh well.
Assets that are only used by this app can be put in the assets/ directory. Then use the Svelte way of importing the images and assets.
If the asset is referenced by other apps as well, it's possible that it's already in the parent codebase. Check this to make sure you're not uploading duplicate images.
The App.svelte file can have two major exports:
export let pid: number
: The PID of the process, will also be passed to the Runtime in the window renderer,export let app: App
: The current process' forked app data. Changing anything here will immediately update the process.
Please use scoped rulesets to only modify the content of your application, leaving the rest of the codebase untouched:
window#appTemplate > div.foo > div.bar {
la: dee, da;
}