Skip to content

Commit

Permalink
don't compile .ts in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Apr 25, 2023
1 parent 213717c commit 9479a86
Showing 1 changed file with 168 additions and 174 deletions.
342 changes: 168 additions & 174 deletions website/docusaurus.config.js
Expand Up @@ -5,167 +5,174 @@ const lightCodeTheme = require("prism-react-renderer/themes/github")
const darkCodeTheme = require("prism-react-renderer/themes/vsDark")

const lightTheme = {
...lightCodeTheme,
styles: [
...lightCodeTheme.styles,
{
types: ['title'],
style: {
color: '#0550AE',
fontWeight: 'bold',
},
},
{
types: ['parameter'],
style: {
color: '#953800',
},
},
{
types: ['boolean', 'rule', 'color', 'number', 'constant', 'property'],
style: {
color: '#005CC5',
},
},
{
types: ['atrule', 'tag'],
style: {
color: '#22863A',
},
},
{
types: ['script'],
style: {
color: '#24292E',
},
},
{
types: ['operator', 'unit', 'rule'],
style: {
color: '#D73A49',
},
},
{
types: ['font-matter', 'string', 'attr-value'],
style: {
color: '#C6105F',
},
},
{
types: ['class-name'],
style: {
color: '#116329',
},
},
{
types: ['attr-name'],
style: {
color: '#0550AE',
},
},
{
types: ['keyword'],
style: {
color: '#CF222E',
},
},
{
types: ['function'],
style: {
color: '#8250DF',
},
},
{
types: ['selector'],
style: {
color: '#6F42C1',
},
},
{
types: ['variable'],
style: {
color: '#E36209',
},
},
{
types: ['comment'],
style: {
color: '#6B6B6B',
},
},
],
};
...lightCodeTheme,
styles: [
...lightCodeTheme.styles,
{
types: ["title"],
style: {
color: "#0550AE",
fontWeight: "bold",
},
},
{
types: ["parameter"],
style: {
color: "#953800",
},
},
{
types: [
"boolean",
"rule",
"color",
"number",
"constant",
"property",
],
style: {
color: "#005CC5",
},
},
{
types: ["atrule", "tag"],
style: {
color: "#22863A",
},
},
{
types: ["script"],
style: {
color: "#24292E",
},
},
{
types: ["operator", "unit", "rule"],
style: {
color: "#D73A49",
},
},
{
types: ["font-matter", "string", "attr-value"],
style: {
color: "#C6105F",
},
},
{
types: ["class-name"],
style: {
color: "#116329",
},
},
{
types: ["attr-name"],
style: {
color: "#0550AE",
},
},
{
types: ["keyword"],
style: {
color: "#CF222E",
},
},
{
types: ["function"],
style: {
color: "#8250DF",
},
},
{
types: ["selector"],
style: {
color: "#6F42C1",
},
},
{
types: ["variable"],
style: {
color: "#E36209",
},
},
{
types: ["comment"],
style: {
color: "#6B6B6B",
},
},
],
}

const darkTheme = {
plain: {
color: '#D4D4D4',
backgroundColor: '#212121',
},
styles: [
...darkCodeTheme.styles,
{
types: ['title'],
style: {
color: '#569CD6',
fontWeight: 'bold',
},
},
{
types: ['property', 'parameter'],
style: {
color: '#9CDCFE',
},
plain: {
color: "#D4D4D4",
backgroundColor: "#212121",
},
{
types: ['script'],
style: {
color: '#D4D4D4',
},
},
{
types: ['boolean', 'arrow', 'atrule', 'tag'],
style: {
color: '#569CD6',
},
},
{
types: ['number', 'color', 'unit'],
style: {
color: '#B5CEA8',
},
},
{
types: ['font-matter'],
style: {
color: '#CE9178',
},
},
{
types: ['keyword', 'rule'],
style: {
color: '#C586C0',
},
},
{
types: ['regex'],
style: {
color: '#D16969',
},
},
{
types: ['maybe-class-name'],
style: {
color: '#4EC9B0',
},
},
{
types: ['constant'],
style: {
color: '#4FC1FF',
},
},
],
};
styles: [
...darkCodeTheme.styles,
{
types: ["title"],
style: {
color: "#569CD6",
fontWeight: "bold",
},
},
{
types: ["property", "parameter"],
style: {
color: "#9CDCFE",
},
},
{
types: ["script"],
style: {
color: "#D4D4D4",
},
},
{
types: ["boolean", "arrow", "atrule", "tag"],
style: {
color: "#569CD6",
},
},
{
types: ["number", "color", "unit"],
style: {
color: "#B5CEA8",
},
},
{
types: ["font-matter"],
style: {
color: "#CE9178",
},
},
{
types: ["keyword", "rule"],
style: {
color: "#C586C0",
},
},
{
types: ["regex"],
style: {
color: "#D16969",
},
},
{
types: ["maybe-class-name"],
style: {
color: "#4EC9B0",
},
},
{
types: ["constant"],
style: {
color: "#4FC1FF",
},
},
],
}

const config = configure(
{
Expand Down Expand Up @@ -204,11 +211,11 @@ const config = configure(
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
announcementBar: {
id: 'support_us',
id: "support_us",
content:
'Technical Preview - Join the <a href="https://github.com/microsoft/devicescript/discussions">discussions</a> to provide feedback.',
backgroundColor: '#fafbfc',
textColor: '#091E42',
backgroundColor: "#fafbfc",
textColor: "#091E42",
isCloseable: true,
},
colorMode: {
Expand Down Expand Up @@ -340,19 +347,6 @@ const config = configure(
},
compileCode: {
langs: [
{
lang: "ts",
nodeBin: "devicescript",
args: [
"--no-colors",
"--quiet",
"--ignore-missing-config",
"input.ts",
],
npmPackage: "@devicescript/cli",
excludedFiles: ["**/api/clients/*.md"],
prefix: 'import * as ds from "@devicescript/core"',
},
{
lang: "rx",
nodeBin: "swirly",
Expand Down

0 comments on commit 9479a86

Please sign in to comment.