Skip to content

Commit 5915c18

Browse files
committed
feat: nx builds
1 parent 984f150 commit 5915c18

File tree

12 files changed

+325
-77
lines changed

12 files changed

+325
-77
lines changed

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,10 @@ _site
110110
.jekyll-metadata
111111
vendor
112112

113-
settings.json*
113+
settings.json*
114+
115+
116+
.nx/cache
117+
.nx/workspace-data
118+
.cursor/rules/nx-rules.mdc
119+
.github/instructions/nx.instructions.md

.mcp.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"mcpServers": {
3+
"nx-mcp": {
4+
"type": "stdio",
5+
"command": "npx",
6+
"args": [
7+
"nx",
8+
"mcp"
9+
]
10+
}
11+
}
12+
}

.nxignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
packages/demo

bun.lock

Lines changed: 267 additions & 65 deletions
Large diffs are not rendered by default.

nx.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$schema": "./node_modules/nx/schemas/nx-schema.json",
3+
"targetDefaults": {
4+
"build": {
5+
"dependsOn": ["^build"],
6+
"executor": "@nx/workspace:run-commands",
7+
"options": { "command": "bun run build" },
8+
"outputs": ["{projectRoot}/dist"],
9+
"cache": true
10+
},
11+
"typecheck": {
12+
"executor": "@nx/workspace:run-commands",
13+
"options": { "command": "bun typecheck" },
14+
"dependsOn": ["^typecheck"]
15+
},
16+
"docs:ci": {
17+
"executor": "@nx/workspace:run-commands",
18+
"options": { "command": "bun docs:ci" },
19+
"outputs": ["./docs"],
20+
"cache": true
21+
}
22+
}
23+
}

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.1.0",
44
"type": "module",
55
"private": true,
6+
"packageManager": "bun@1.3.0",
67
"workspaces": {
78
"packages": [
89
"./packages/*"
@@ -25,11 +26,11 @@
2526
"lint": "eslint --ignore-pattern '**/dist/**'",
2627
"lint:fix": "bun run lint --fix",
2728
"prepare": "husky",
28-
"typecheck": "sh ./scripts/typecheck.sh",
29-
"build": "sh ./scripts/build.sh",
29+
"typecheck": "nx run-many -t typecheck",
30+
"build": "nx run-many -t build",
3031
"ci:publish": "sh ./scripts/publish.sh",
3132
"ci:canary": "sh ./scripts/canary.sh",
32-
"docs": "sh ./scripts/docs.sh",
33+
"docs": "nx run-many -t docs:ci",
3334
"scan-deps": "depcruise packages --progress"
3435
},
3536
"engines": {
@@ -42,6 +43,7 @@
4243
},
4344
"devDependencies": {
4445
"@changesets/cli": "^2.29.2",
46+
"@nx/workspace": "^21.6.5",
4547
"@semantic-release/git": "^10.0.1",
4648
"@sundaeswap/babel-preset": "^2.0.15",
4749
"@sundaeswap/docgen": "^0.1.9",
@@ -57,6 +59,7 @@
5759
"jest-fetch-mock": "^3.0.3",
5860
"lint-staged": "^15.5.1",
5961
"log-update": "^6.1.0",
62+
"nx": "21.6.5",
6063
"prettier": "^3.5.3",
6164
"typedoc": "0.26.7",
6265
"typedoc-plugin-frontmatter": "1.0.0",

packages/cli/src/utils.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {
33
Blaze,
44
Blockfrost,
55
ColdWallet,
6-
HotWallet,
76
Core,
7+
HotWallet,
88
Maestro,
99
Wallet,
1010
type Provider,
@@ -15,10 +15,10 @@ import {
1515
EContractVersion,
1616
type IPoolData,
1717
} from "@sundaeswap/core";
18-
import type { State } from "./types.js";
19-
import { setWallet } from "./menus/settings.js";
2018
import * as crypto from "crypto";
2119
import { setTimeout } from "timers/promises";
20+
import { setWallet } from "./menus/settings.js";
21+
import type { State } from "./types.js";
2222

2323
export async function getWallet(
2424
state: State,
@@ -135,6 +135,7 @@ export async function getPoolData(
135135
Core.AssetName(poolNft),
136136
),
137137
);
138+
138139
const datum = builder.datumBuilder.decodeDatum(
139140
poolUtxo.output().datum()!.asInlineData()!,
140141
);

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
}
5959
},
6060
"scripts": {
61-
"typecheck": "tsc --noEmit",
61+
"typecheck": "tsc --noEmit --emitDeclarationOnly false",
6262
"clean": "rm -rf ./dist",
6363
"build:esm": "cross-env BABEL_ENV=esmUnbundled babel src --extensions '.ts,.tsx' --out-dir './dist/esm' --source-maps",
6464
"build:cjs": "cross-env BABEL_ENV=cjs babel src --extensions '.ts,.tsx' --out-dir 'dist/cjs' --source-maps",

packages/gummiworm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
"scripts": {
3535
"clean": "rm -rf ./dist",
36-
"typecheck": "tsc --noEmit",
36+
"typecheck": "tsc --noEmit --emitDeclarationOnly false",
3737
"compile:esm": "tsc --outDir dist/esm",
3838
"compile:cjs": "tsc --outDir dist/cjs --module commonjs",
3939
"compile:types": "tsc --outDir dist/types --emitDeclarationOnly --declarationMap --declaration",

packages/math/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
}
3232
},
3333
"scripts": {
34-
"typecheck": "tsc --noEmit",
34+
"typecheck": "tsc --noEmit --emitDeclarationOnly false",
3535
"clean": "rm -rf ./dist",
3636
"build:esm": "cross-env BABEL_ENV=esmUnbundled babel src --extensions '.ts,.tsx' --out-dir './dist/esm' --source-maps",
3737
"build:cjs": "cross-env BABEL_ENV=cjs babel src --extensions '.ts,.tsx' --out-dir 'dist/cjs' --source-maps",

0 commit comments

Comments
 (0)