Skip to content

Commit

Permalink
docs: add new shopping cart quickstarts (#381)
Browse files Browse the repository at this point in the history
and update links between quickstarts
  • Loading branch information
pvlugter authored Jul 1, 2022
1 parent 9006d81 commit 9cc6143
Show file tree
Hide file tree
Showing 36 changed files with 2,504 additions and 4 deletions.
66 changes: 66 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,21 @@ jobs:
npm install
npm run build
npm test
- run:
name: "Test quickstart: JS Shopping Cart"
working_directory: "~/tmp"
command: |
# use the bundled quickstart to check against what the user will download
unzip -d js-shopping-cart ~/project/docs/build/src/managed/modules/javascript/attachments/js-shopping-cart-quickstart.zip
cd js-shopping-cart
export KALIX_NPMJS_CODEGEN_BINARY="${HOME}/project/codegen/js-gen-cli/target/native-image/kalix-codegen-js"
npm install --save \
"$HOME/project/sdk/kalix-io-kalix-javascript-sdk-0.0.0.tgz" \
"$HOME/project/npm-js/kalix-scripts/kalix-io-kalix-scripts-1.0.0.tgz" \
"$HOME/project/testkit/kalix-io-testkit-0.0.0.tgz"
npm install
npm run build
npm test
- run:
name: "Test quickstart: TS Customer Registry"
working_directory: "~/tmp"
Expand All @@ -257,6 +272,21 @@ jobs:
npm install
npm run build
npm test
- run:
name: "Test quickstart: TS Shopping Cart"
working_directory: "~/tmp"
command: |
# use the bundled quickstart to check against what the user will download
unzip -d ts-shopping-cart ~/project/docs/build/src/managed/modules/javascript/attachments/ts-shopping-cart-quickstart.zip
cd ts-shopping-cart
export KALIX_NPMJS_CODEGEN_BINARY="${HOME}/project/codegen/js-gen-cli/target/native-image/kalix-codegen-js"
npm install --save \
"$HOME/project/sdk/kalix-io-kalix-javascript-sdk-0.0.0.tgz" \
"$HOME/project/npm-js/kalix-scripts/kalix-io-kalix-scripts-1.0.0.tgz" \
"$HOME/project/testkit/kalix-io-testkit-0.0.0.tgz"
npm install
npm run build
npm test
- run:
name: "Test JS Value Entity Counter sample"
command: |
Expand Down Expand Up @@ -401,6 +431,24 @@ jobs:
npm install
npm run build
npm run integration-test
- run:
name: "integration tests: js-shopping-cart-quickstart"
working_directory: "~/tmp"
command: |
export VERSION_CHECK_ON_STARTUP=false
export KALIX_NPMJS_CODEGEN_BINARY="${HOME}/project/codegen/js-gen-cli/target/native-image/kalix-codegen-js"
source /opt/circleci/.nvm/nvm.sh
pushd ~/project/sdk && nvm install && popd
# use the bundled quickstart to check against what the user will download
unzip -d js-shopping-cart ~/project/docs/build/src/managed/modules/javascript/attachments/js-shopping-cart-quickstart.zip
cd js-shopping-cart
npm install --save \
"$HOME/project/sdk/kalix-io-kalix-javascript-sdk-0.0.0.tgz" \
"$HOME/project/npm-js/kalix-scripts/kalix-io-kalix-scripts-1.0.0.tgz" \
"$HOME/project/testkit/kalix-io-testkit-0.0.0.tgz"
npm install
npm run build
npm run integration-test
- run:
name: "integration tests: ts-customer-registry-quickstart"
working_directory: "~/tmp"
Expand All @@ -419,6 +467,24 @@ jobs:
npm install
npm run build
npm run integration-test
- run:
name: "integration tests: ts-shopping-cart-quickstart"
working_directory: "~/tmp"
command: |
export VERSION_CHECK_ON_STARTUP=false
export KALIX_NPMJS_CODEGEN_BINARY="${HOME}/project/codegen/js-gen-cli/target/native-image/kalix-codegen-js"
source /opt/circleci/.nvm/nvm.sh
pushd ~/project/sdk && nvm install && popd
# use the bundled quickstart to check against what the user will download
unzip -d ts-shopping-cart ~/project/docs/build/src/managed/modules/javascript/attachments/ts-shopping-cart-quickstart.zip
cd ts-shopping-cart
npm install --save \
"$HOME/project/sdk/kalix-io-kalix-javascript-sdk-0.0.0.tgz" \
"$HOME/project/npm-js/kalix-scripts/kalix-io-kalix-scripts-1.0.0.tgz" \
"$HOME/project/testkit/kalix-io-testkit-0.0.0.tgz"
npm install
npm run build
npm run integration-test
- run:
name: "integration tests: samples/js/js-customer-registry"
command: |
Expand Down
6 changes: 4 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ examples:
rsync -a --exclude-from=.examplesignore ../samples/js/js-doc-snippets/ "${managed_examples}/js-doc-snippets/"
rsync -a --exclude-from=.examplesignore ../samples/js/js-customer-registry/ "${managed_examples}/js-customer-registry/"
rsync -a --exclude-from=.examplesignore ../samples/js/js-customer-registry-quickstart/ "${managed_examples}/js-customer-registry-quickstart/"
rsync -a --exclude-from=.examplesignore ../samples/js/js-shopping-cart-quickstart/ "${managed_examples}/js-shopping-cart-quickstart/"
rsync -a --exclude-from=.examplesignore ../samples/js/js-valueentity-shopping-cart/ "${managed_examples}/js-valueentity-shopping-cart/"
rsync -a --exclude-from=.examplesignore ../samples/js/valueentity-counter/ "${managed_examples}/valueentity-counter/"
rsync -a --exclude-from=.examplesignore ../samples/js/js-eventsourced-shopping-cart/ "${managed_examples}/js-eventsourced-shopping-cart/"
rsync -a --exclude-from=.examplesignore ../samples/js/js-replicated-entity-shopping-cart/ "${managed_examples}/js-replicated-entity-shopping-cart/"
rsync -a --exclude-from=.examplesignore ../samples/ts/ts-customer-registry/ "${managed_examples}/ts-customer-registry/"
rsync -a --exclude-from=.examplesignore ../samples/ts/ts-customer-registry-quickstart/ "${managed_examples}/ts-customer-registry-quickstart/"
rsync -a --exclude-from=.examplesignore ../samples/ts/ts-shopping-cart-quickstart/ "${managed_examples}/ts-shopping-cart-quickstart/"
rsync -a --exclude-from=.examplesignore ../samples/ts/ts-valueentity-shopping-cart/ "${managed_examples}/ts-valueentity-shopping-cart/"
rsync -a --exclude-from=.examplesignore ../samples/ts/ts-valueentity-counter/ "${managed_examples}/ts-valueentity-counter/"
rsync -a --exclude-from=.examplesignore ../samples/ts/ts-eventsourced-shopping-cart/ "${managed_examples}/ts-eventsourced-shopping-cart/"
Expand All @@ -60,8 +62,8 @@ examples:
bundles:
bin/bundle.sh --zip "${managed_attachments}/js-customer-registry-quickstart.zip" ../samples/js/js-customer-registry-quickstart
bin/bundle.sh --zip "${managed_attachments}/ts-customer-registry-quickstart.zip" ../samples/ts/ts-customer-registry-quickstart
bin/bundle.sh --zip "${managed_attachments}/js-eventsourced-shopping-cart.zip" ../samples/js/js-eventsourced-shopping-cart
bin/bundle.sh --zip "${managed_attachments}/ts-eventsourced-shopping-cart.zip" ../samples/ts/ts-eventsourced-shopping-cart
bin/bundle.sh --zip "${managed_attachments}/js-shopping-cart-quickstart.zip" ../samples/js/js-shopping-cart-quickstart
bin/bundle.sh --zip "${managed_attachments}/ts-shopping-cart-quickstart.zip" ../samples/ts/ts-shopping-cart-quickstart

dev: clean managed validate-xrefs dev-html

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ mkdir proto

. Add declarations for:
+
--
* The protobuf syntax version, `proto3`.
* The package name, `customer.api`.
* Import `google/protobuf/empty.proto` and Kalix `kalix/annotations.proto`.
--
+
[source,proto,indent=0]
.proto/customer_api.proto
Expand Down Expand Up @@ -240,4 +242,4 @@ kalix service expose customer-registry
== Next steps

* You can learn more about xref:javascript:value-entity.adoc[Value Entities].
* Do another https://docs.kalix.io/quickstart/sc-eventsourced-entity-javascript.html[Quickstart] to learn about Event Sourcing and xref:javascript:eventsourced.adoc[Event Sourced Entities].
* Do another xref:javascript:quickstart/sc-eventsourced-entity-javascript.adoc[Quickstart] to learn about Event Sourcing and xref:javascript:eventsourced.adoc[Event Sourced Entities].
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ mkdir proto

. Add declarations for:
+
--
* The protobuf syntax version, `proto3`.
* The package name, `customer.api`.
* Import `google/protobuf/empty.proto` and Kalix `kalix/annotations.proto`.
--
+
[source, proto, indent=0]
.proto/customer_api.proto
Expand Down Expand Up @@ -240,4 +242,4 @@ kalix service expose customer-registry
== Next steps

* You can learn more about xref:javascript:value-entity.adoc[Value Entities].
* Do another https://docs.kalix.io/quickstart/sc-eventsourced-entity-javascript.html[Quickstart] to learn about Event Sourcing and xref:javascript:eventsourced.adoc[Event Sourced Entities].
* Do another xref:javascript:quickstart/sc-eventsourced-entity-typescript.adoc[Quickstart] to learn about Event Sourcing and xref:javascript:eventsourced.adoc[Event Sourced Entities].
Loading

0 comments on commit 9cc6143

Please sign in to comment.