Skip to content

Commit

Permalink
Merge pull request #101 from lastmile-ai/pr101
Browse files Browse the repository at this point in the history
[Docs][1/n] AIConfig doc updates
  • Loading branch information
saqadri authored Nov 7, 2023
2 parents 0ff82c9 + 95459d9 commit 6d9ea8c
Show file tree
Hide file tree
Showing 16 changed files with 1,117 additions and 28 deletions.
126 changes: 126 additions & 0 deletions aiconfig-docs/core/prismTheme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/**
* Copyright (c) LastMile AI, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const theme = {
plain: {
color: "#FFFFFF",
backgroundColor: "#282C34",
},
styles: [
{
types: ["property"],
style: {
color: "#2aa198",
},
},
{
types: ["attr-name", "comment", "prolog", "doctype", "cdata"],
style: {
color: "#93a1a1",
},
},
{
types: ["punctuation"],
style: {
color: "#657b83",
},
},
{
types: ["namespace"],
style: {
opacity: 0.7,
},
},
{
types: ["selector", "char", "builtin", "url"],
style: {
color: "#2aa198",
},
},
{
types: ["entity"],
style: {
color: "#2aa198",
},
},
{
types: ["atrule", "inserted"],
style: {
color: "#859900",
},
},
{
types: ["important", "variable", "deleted"],
style: {
color: "#cb4b16",
},
},
{
types: ["important", "bold"],
style: {
fontWeight: "bold",
},
},
{
types: ["italic"],
style: {
fontStyle: "italic",
},
},
{
types: ["entity"],
style: {
cursor: "help",
},
},
// react-native theme
{
types: ["attr-name", "keyword"],
style: {
color: "#c5a5c5",
},
},
{
types: ["string", "regex", "attr-value"],
style: {
color: "#8dc891",
},
},
{
types: ["number", "constant", "symbol"],
style: {
color: "#5a9bcf",
},
},
{
types: ["boolean"],
style: {
color: "#ff8b50",
},
},
{
types: ["class-name"],
style: {
color: "#fac863",
},
},
{
types: ["function"],
style: {
color: "#79b6f2",
},
},
{
types: ["operator", "tag"],
style: {
color: "#fc929e",
},
},
],
};

export default theme;
75 changes: 75 additions & 0 deletions aiconfig-docs/core/tabConstants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/**
* Copyright (c) LastMile AI, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import ExecutionEnvironment from "@docusaurus/ExecutionEnvironment";

const isMacOS = ExecutionEnvironment.canUseDOM
? navigator.platform.startsWith("Mac")
: false;
const isWindows = ExecutionEnvironment.canUseDOM
? navigator.platform.startsWith("Win")
: false;

const defaultSyntax = "functional";

const nodePackageManagers = [
{ label: "npm", value: "npm" },
{ label: "Yarn", value: "yarn" },
];
const defaultNodePackageManager = "npm";

const pythonPackageManagers = [
{ label: "pip", value: "pip" },
{ label: "poetry", value: "poetry" },
];
const defaultPythonPackageManager = "pip";

const aiConfigLanguages = [
{ label: "Node.js (TypeScript)", value: "node" },
{ label: "Python", value: "python" },
];
const defaultAIConfigLanguage = "python";

const platforms = [
{ label: "Android", value: "android" },
{ label: "iOS", value: "ios" },
];
const defaultPlatform = isMacOS ? "ios" : "android";

const oses = [
{ label: "macOS", value: "macos" },
{ label: "Windows", value: "windows" },
{ label: "Linux", value: "linux" },
];
const defaultOs = isMacOS ? "macos" : isWindows ? "windows" : "linux";

const getDevNotesTabs = (tabs = ["android", "ios", "web", "windows"]) =>
[
tabs.includes("android")
? { label: "Android", value: "android" }
: undefined,
tabs.includes("ios") ? { label: "iOS", value: "ios" } : undefined,
tabs.includes("web") ? { label: "Web", value: "web" } : undefined,
tabs.includes("windows")
? { label: "Windows", value: "windows" }
: undefined,
].filter(Boolean);

export default {
defaultOs,
defaultNodePackageManager,
defaultPythonPackageManager,
defaultPlatform,
defaultSyntax,
defaultAIConfigLanguage,
getDevNotesTabs,
oses,
nodePackageManagers,
pythonPackageManagers,
platforms,
aiConfigLanguages,
};
4 changes: 2 additions & 2 deletions aiconfig-docs/docs/cookbooks/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Customization & Extensibility",
"position": 5,
"label": "Cookbooks & Guides",
"position": 10,
"link": {
"type": "generated-index"
}
Expand Down
4 changes: 2 additions & 2 deletions aiconfig-docs/docs/extensibility/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Cookbooks & Guides",
"position": 10,
"label": "Customization & Extensibility",
"position": 5,
"link": {
"type": "generated-index"
}
Expand Down
15 changes: 15 additions & 0 deletions aiconfig-docs/docs/introduction/basic-structure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
sidebar_position: 3
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import constants from '@site/core/tabConstants';

# Basic Structure

## Model Parsers

## Config File

## SDK
Loading

0 comments on commit 6d9ea8c

Please sign in to comment.