diff --git a/packages/fuels/package.json b/packages/fuels/package.json index 35bb4b853d..8f9191b404 100644 --- a/packages/fuels/package.json +++ b/packages/fuels/package.json @@ -55,7 +55,8 @@ "build:package": "tsup", "build:browser": "pnpm vite build", "build:minified": "pnpm uglifyjs --compress --mangle --output dist/browser.min.mjs -- dist/browser.mjs", - "postbuild": "run-s type:declarations", + "postbuild": "run-s build:recipes type:declarations", + "build:recipes": "cd ../recipes && pnpm build:all && cd ../fuels", "type:declarations": "tsc --emitDeclarationOnly -p tsconfig.dts.json", "type:check": "tsc --noEmit", "prepublishOnly": "cp ../../README.md ./README.md" diff --git a/packages/recipes/package.json b/packages/recipes/package.json index bc566fe267..05218f8f2d 100644 --- a/packages/recipes/package.json +++ b/packages/recipes/package.json @@ -20,9 +20,9 @@ "dist" ], "scripts": { - "build": "run-s build:recipes build:package build:format", + "build:all": "run-s build:recipes build build:format", "build:recipes": "tsx ./scripts/build-recipes.ts", - "build:package": "tsup", + "build": "tsup", "build:format": "prettier --config ../../.prettierrc --log-level error --write .", "postbuild": "tsx ../../scripts/postbuild.ts" }, diff --git a/packages/recipes/scripts/build-recipes.ts b/packages/recipes/scripts/build-recipes.ts index 6e10361966..702a5eaf0b 100644 --- a/packages/recipes/scripts/build-recipes.ts +++ b/packages/recipes/scripts/build-recipes.ts @@ -2,7 +2,7 @@ import { execSync } from 'child_process'; import { readFileSync, writeFileSync } from 'fs'; import { join } from 'path'; -execSync(`fuels typegen -i src/contracts/src14 -o src/types`); +execSync(`node ../fuels/dist/bin.js typegen -i src/contracts/src14 -o src/types`); const typesPath = join(__dirname, '..', 'src', 'types'); const supportedRecipes = ['Src14OwnedProxy']