Skip to content

Commit

Permalink
tweaks to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Dec 6, 2022
1 parent 8816ca0 commit 9c35d8b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
8 changes: 2 additions & 6 deletions website/docs/Dev/_category_.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"label": "Developer Experience",
"position": 3,
"link": {
"type": "generated-index",
"description": "How the editors work."
}
"label": "Developer",
"position": 3
}
6 changes: 1 addition & 5 deletions website/docs/Language/_category_.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"label": "Language",
"position": 2,
"collapsible": true,
"link": {
"type": "generated-index",
"description": "DeviceScript Language and Runtime reference."
}
"collapsible": true
}
6 changes: 6 additions & 0 deletions website/docs/Language/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# DeviceScript Language

DeviceScript is a programming language for scripting [Jacdac](https://aka.ms/jacdac) services in embedded devices.

It has JavaScript-like syntax and is compiled to a custom VM bytecode, which can run in very constrained
environments.
11 changes: 11 additions & 0 deletions website/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,14 @@ environments (VM itself compiles to 10kB of code, with the floating point librar
* small memory (RAM) footprint
* small code (flash) footprint
* leave space for extensions in future

## Live documentation

Most code examples can be loaded in the side-editor by clicking the `Run` button; or in other cloud-based virtual machine by hovering on the source and clicking on the apprioriate button.

```ts
console.log(`click run to load this program in a DeviceScript simulator`)
every(1, () => {
console.log(`hello`)
})
```
3 changes: 2 additions & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ async function createConfig() {
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
routeBasePath: '/',
sidebarPath: require.resolve("./sidebars.js"),
remarkPlugins: [],
},
Expand Down Expand Up @@ -73,7 +74,7 @@ async function createConfig() {
type: "doc",
docId: "intro",
position: "left",
label: "Reference",
label: "Docs",
},
{
href: "https://github.com/microsoft/devicescript/",
Expand Down

0 comments on commit 9c35d8b

Please sign in to comment.