Skip to content

Commit 2bc9c8c

Browse files
committed
update js package references to @spinframework packages
Signed-off-by: Karthik Ganeshram <kganeshr@akamai.com>
1 parent 969c495 commit 2bc9c8c

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

content/v3/build.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ It's normally convenient to put the detailed build instructions in `package.json
7878
```json
7979
{
8080
"scripts": {
81-
"build": "npx webpack && mkdirp dist && j2w -i build/bundle.js -o target/spin-http-js.wasm"
81+
"build": "node build.mjs && mkdirp dist && j2w -i build/bundle.js -o target/spin-http-js.wasm"
8282
}
8383
}
8484
```
8585

86-
{{ details "Parts of the build script" "The build script calls out to [`webpack`](https://webpack.js.org/) and `j2w` which is a script provided by the `@fermyon/spin-sdk` package that utilizes [`ComponentizeJS`](https://github.com/bytecodealliance/ComponentizeJS). [`knitwit`](https://github.com/fermyon/knitwit) is a utility that helps combine `wit` worlds "}}
86+
{{ details "Parts of the build script" "The build script calls out to [`Esbuild`](https://esbuild.github.io/) and `j2w` which is a script provided by the `@spinframework/build-tools` package that utilizes [`ComponentizeJS`](https://github.com/bytecodealliance/ComponentizeJS).
8787

8888
The build command can then call the NPM script:
8989

content/v3/javascript-components.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ hello-world
8686
└── webpack.config.js
8787
```
8888

89-
The source for the component is present in `src/index.ts`. [Webpack](https://webpack.js.org) is used to bundle the component into a single `.js` file which will then be compiled to a `.wasm` module.
89+
The source for the component is present in `src/index.ts`. [Esbuild](https://esbuild.github.io/) is used to bundle the component into a single `.js` file which will then be compiled to a `.wasm` module.
9090

91-
{{ details "Going from JavaScript to Wasm" "The JS source is compiled to a `wasm` module using the `j2w` node executable provided by the `@fermyon/spin-sdk` which is a wrapper around `ComponentizeJS` that is used to manage the dependencies."}}
91+
{{ details "Going from JavaScript to Wasm" "The JS source is compiled to a `wasm` module using the `j2w` node executable provided by the `@spinframework/build-tools` which is a wrapper around `ComponentizeJS` that is used to manage the dependencies."}}
9292

9393
## Building and Running the Template
9494

content/v3/serverless-ai-hello-world.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ fn hello_world(_req: Request) -> anyhow::Result<impl IntoResponse> {
308308
```typescript
309309

310310
import { AutoRouter } from 'itty-router';
311-
import { Llm } from '@fermyon/spin-sdk';
311+
import * as Llm from '@spinframework/spin-llm';
312312

313313
const model = InferencingModels.Llama2Chat
314314

content/v3/variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ async fn handle_api_call_with_token(_req: Request) -> anyhow::Result<impl IntoRe
140140
141141
```ts
142142
import { AutoRouter } from 'itty-router';
143-
import { Variables } from '@fermyon/spin-sdk';
143+
import * as Variables from '@spinframework/spin-variables';
144144

145145
let router = AutoRouter();
146146

content/v4/javascript-components.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ hello-world
8686
└── webpack.config.js
8787
```
8888

89-
The source for the component is present in `src/index.ts`. [Webpack](https://webpack.js.org) is used to bundle the component into a single `.js` file which will then be compiled to a `.wasm` module.
89+
The source for the component is present in `src/index.ts`. [Esbuild](https://esbuild.github.io/) is used to bundle the component into a single `.js` file which will then be compiled to a `.wasm` module.
9090

91-
{{ details "Going from JavaScript to Wasm" "The JS source is compiled to a `wasm` module using the `j2w` node executable provided by the `@fermyon/spin-sdk` which is a wrapper around `ComponentizeJS` that is used to manage the dependencies."}}
91+
{{ details "Going from JavaScript to Wasm" "The JS source is compiled to a `wasm` module using the `j2w` node executable provided by the `@spinframework/build-tools` which is a wrapper around `ComponentizeJS` that is used to manage the dependencies."}}
9292

9393
## Building and Running the Template
9494

content/v4/variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ async fn handle_api_call_with_token(_req: Request) -> anyhow::Result<impl IntoRe
140140
141141
```ts
142142
import { AutoRouter } from 'itty-router';
143-
import { Variables } from '@fermyon/spin-sdk';
143+
import * as Variables from '@spinframework/spin-variables';
144144

145145
let router = AutoRouter();
146146

0 commit comments

Comments
 (0)