Skip to content

Commit

Permalink
[ENG-968] Create “Demo” section in the documentation that is linked f…
Browse files Browse the repository at this point in the history
…rom “konfigthis.com” (konfig-dev#78)

* install stackblitz sdk + start live demo page

* initialize interactive demo

* update scrollycoding selected step bg

* styling + polish writing

* interactive-tutorial

* polish

* /sales-demo

* save

* save

* add yarn build to test script of TS SDK

* Release [email protected]

* Release [email protected]

* update sales-demo-package.json

* add tsconfig to sales demo

* add typescriptTestScript to main konfigyaml impl

* Release [email protected]

* Release [email protected]

* polish

* upgrade konfig-cli for interactive tutorial

* unmount window.onbeforeunload + add make-request.ts
  • Loading branch information
dphuang2 authored Jul 24, 2023
1 parent f574f29 commit 1a8a72e
Show file tree
Hide file tree
Showing 29 changed files with 15,195 additions and 26 deletions.
Submodule tubelightcommunications-sdks updated from e155ac to 4127f4
2 changes: 2 additions & 0 deletions generator/konfig-dash/.yarn/versions/d1d3b602.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
undecided:
- konfig-lib
38 changes: 19 additions & 19 deletions generator/konfig-dash/packages/konfig-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $ npm install -g konfig-cli
$ konfig COMMAND
running command...
$ konfig (--version)
konfig-cli/1.0.232 darwin-arm64 node-v16.19.0
konfig-cli/1.0.234 darwin-arm64 node-v16.19.0
$ konfig --help [COMMAND]
USAGE
$ konfig COMMAND
Expand Down Expand Up @@ -69,7 +69,7 @@ EXAMPLES
$ konfig bump
```

_See code: [dist/commands/bump.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/bump.ts)_
_See code: [dist/commands/bump.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/bump.ts)_

## `konfig detect-breaking-change`

Expand All @@ -90,7 +90,7 @@ EXAMPLES
$ konfig detect-breaking-change
```

_See code: [dist/commands/detect-breaking-change.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/detect-breaking-change.ts)_
_See code: [dist/commands/detect-breaking-change.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/detect-breaking-change.ts)_

## `konfig diff`

Expand All @@ -107,7 +107,7 @@ EXAMPLES
$ konfig diff
```

_See code: [dist/commands/diff.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/diff.ts)_
_See code: [dist/commands/diff.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/diff.ts)_

## `konfig fix`

Expand Down Expand Up @@ -135,7 +135,7 @@ EXAMPLES
$ konfig fix
```

_See code: [dist/commands/fix.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/fix.ts)_
_See code: [dist/commands/fix.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/fix.ts)_

## `konfig generate`

Expand Down Expand Up @@ -184,7 +184,7 @@ EXAMPLES
$ konfig generate
```

_See code: [dist/commands/generate.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/generate.ts)_
_See code: [dist/commands/generate.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/generate.ts)_

## `konfig help [COMMAND]`

Expand Down Expand Up @@ -224,7 +224,7 @@ EXAMPLES
$ konfig ignore
```

_See code: [dist/commands/ignore.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/ignore.ts)_
_See code: [dist/commands/ignore.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/ignore.ts)_

## `konfig init`

Expand All @@ -247,7 +247,7 @@ EXAMPLES
$ konfig init
```

_See code: [dist/commands/init.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/init.ts)_
_See code: [dist/commands/init.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/init.ts)_

## `konfig lint`

Expand All @@ -264,7 +264,7 @@ EXAMPLES
$ konfig lint
```

_See code: [dist/commands/lint.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/lint.ts)_
_See code: [dist/commands/lint.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/lint.ts)_

## `konfig login`

Expand All @@ -281,7 +281,7 @@ EXAMPLES
$ konfig login
```

_See code: [dist/commands/login.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/login.ts)_
_See code: [dist/commands/login.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/login.ts)_

## `konfig logout`

Expand All @@ -298,7 +298,7 @@ EXAMPLES
$ konfig logout
```

_See code: [dist/commands/logout.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/logout.ts)_
_See code: [dist/commands/logout.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/logout.ts)_

## `konfig mock`

Expand All @@ -315,7 +315,7 @@ EXAMPLES
$ konfig mock
```

_See code: [dist/commands/mock.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/mock.ts)_
_See code: [dist/commands/mock.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/mock.ts)_

## `konfig p2o`

Expand All @@ -336,7 +336,7 @@ EXAMPLES
$ konfig p2o
```

_See code: [dist/commands/p2o.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/p2o.ts)_
_See code: [dist/commands/p2o.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/p2o.ts)_

## `konfig publish`

Expand All @@ -362,7 +362,7 @@ EXAMPLES
$ konfig publish
```

_See code: [dist/commands/publish.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/publish.ts)_
_See code: [dist/commands/publish.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/publish.ts)_

## `konfig pull`

Expand All @@ -379,7 +379,7 @@ EXAMPLES
$ konfig pull
```

_See code: [dist/commands/pull.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/pull.ts)_
_See code: [dist/commands/pull.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/pull.ts)_

## `konfig push`

Expand All @@ -403,7 +403,7 @@ EXAMPLES
$ konfig push
```

_See code: [dist/commands/push.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/push.ts)_
_See code: [dist/commands/push.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/push.ts)_

## `konfig revalidate-demos [FILE]`

Expand All @@ -425,7 +425,7 @@ EXAMPLES
$ konfig revalidate-demos
```

_See code: [dist/commands/revalidate-demos.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/revalidate-demos.ts)_
_See code: [dist/commands/revalidate-demos.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/revalidate-demos.ts)_

## `konfig slack-msg [FILE]`

Expand All @@ -446,7 +446,7 @@ EXAMPLES
$ konfig slack-msg
```

_See code: [dist/commands/slack-msg.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/slack-msg.ts)_
_See code: [dist/commands/slack-msg.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/slack-msg.ts)_

## `konfig test`

Expand All @@ -467,5 +467,5 @@ EXAMPLES
$ konfig test
```

_See code: [dist/commands/test.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.232/dist/commands/test.ts)_
_See code: [dist/commands/test.ts](https://github.com/konfig-dev/konfig-cli/blob/v1.0.234/dist/commands/test.ts)_
<!-- commandsstop -->
2 changes: 1 addition & 1 deletion generator/konfig-dash/packages/konfig-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "konfig-cli",
"version": "1.0.232",
"version": "1.0.234",
"description": "CLI for Generating SDKs with Konfig",
"author": "dphuang2 @dphuang2",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion generator/konfig-dash/packages/konfig-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@
"typescript": "^4.7.4",
"zod-to-json-schema": "^3.20.4"
},
"version": "1.0.141"
"version": "1.0.143"
}
6 changes: 4 additions & 2 deletions generator/konfig-dash/packages/konfig-lib/src/KonfigYaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ export const go = generatorCommonOptional
.strict()
export const swift = generatorCommon.merge(swiftConfig).strict()

const typescriptTestScript: string[] = ['yarn', 'yarn test', 'yarn build']

const genericGeneratorConfig = z
.union([
z
Expand Down Expand Up @@ -402,7 +404,7 @@ const genericGeneratorConfig = z
])
.transform((config) => {
if (config.generator === 'typescript' && config.test === undefined) {
config.test = { script: ['yarn', 'yarn test'] }
config.test = { script: typescriptTestScript }
}
return config
})
Expand Down Expand Up @@ -452,7 +454,7 @@ export const KonfigYaml = KonfigYamlCommon.merge(
if (typescriptConfig === undefined) return
if (typescriptConfig.test !== undefined) return typescriptConfig
typescriptConfig.test = {
script: ['yarn', 'yarn test'],
script: typescriptTestScript,
}
return typescriptConfig
}),
Expand Down
11 changes: 10 additions & 1 deletion generator/konfig-docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ const config = {
routeBasePath: "/docs",
sidebarPath: require.resolve("./sidebars.js"),
},
pages: {
beforeDefaultRemarkPlugins: beforeRemarkPlugins,
remarkPlugins: remarkPlugins,
},
theme: {
customCss: [
require.resolve("@code-hike/mdx/styles.css"),
Expand Down Expand Up @@ -169,8 +173,13 @@ const config = {
position: "left",
label: "Documentation",
},
{ to: "/blog", label: "Blog", position: "left" },
{
to: "/interactive-tutorial",
label: "Interactive Tutorial",
position: "left",
},
{ to: "/schedule-demo", label: "Schedule Demo", position: "right" },
{ to: "/blog", label: "Blog", position: "right" },
{ to: "/about", label: "About", position: "right" },
],
},
Expand Down
1 change: 1 addition & 0 deletions generator/konfig-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@easyops-cn/docusaurus-search-local": "^0.35.0",
"@fortawesome/fontawesome-free": "^6.4.0",
"@mdx-js/react": "2",
"@stackblitz/sdk": "^1.9.0",
"autoprefixer": "^10.4.14",
"clsx": "^1.1.1",
"docusaurus-json-schema-plugin": "^1.6.0",
Expand Down
2 changes: 1 addition & 1 deletion generator/konfig-docs/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ html[data-theme="dark"] .ch-scrollycoding-step-content {

.ch-scrollycoding-step-content[data-selected] {
border-color: var(--ifm-color-primary-dark);
background-color: var(--ifm-color-gray-100);
background-color: var(--ifm-color-gray-200);
}

html[data-theme="dark"] .ch-scrollycoding-step-content[data-selected] {
Expand Down
Loading

0 comments on commit 1a8a72e

Please sign in to comment.