Skip to content

Commit

Permalink
Refactor Build Tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
sinclairzx81 committed Apr 28, 2024
1 parent 456841f commit 2c5cbe5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion hammer.mjs
Expand Up @@ -57,7 +57,7 @@ export async function build_check(target = 'target/build') {
await shell(`cd ${target} && attw sinclair-typebox-${version}.tgz`)
}
export async function build(target = 'target/build') {
// await test()
await test()
await clean()
await Promise.all([
Build.Package.build(target),
Expand Down
3 changes: 0 additions & 3 deletions package.json
Expand Up @@ -14,9 +14,6 @@
"type": "git",
"url": "https://github.com/sinclairzx81/typebox"
},
"esm.sh": {
"bundle": false
},
"scripts": {
"test:typescript": "hammer task test_typescript",
"test:static": "hammer task test_static",
Expand Down
14 changes: 6 additions & 8 deletions task/build/package/create-package-json.ts
Expand Up @@ -54,7 +54,6 @@ function resolveSubmoduleExports(submodule: string) {
import: {
types: `./build/esm/${submodule}/index.d.mts`,
default: `./build/esm/${submodule}/index.mjs`,

}
}
}
Expand Down Expand Up @@ -90,13 +89,12 @@ function resolveMetadata() {
author: packageJson.author,
license: packageJson.license,
repository: packageJson.repository,
// disable auto bundling via esm.sh
'esm.sh': packageJson['esm.sh'],
// flagged by socket.dev
scripts: { test: 'echo test' },
types: "./build/require/index.d.ts",
main: "./build/require/index.js",
module: "./build/import/index.mjs",

scripts: { test: 'echo test' },
// disable auto bundle strategy: see https://github.com/esm-dev/esm.sh#bundling-strategy
'esm.sh': { 'bundle': false },
types: "./build/cjs/index.d.ts",
main: "./build/cjs/index.js",
module: "./build/esm/index.mjs"
}
}

0 comments on commit 2c5cbe5

Please sign in to comment.