feat(css): add framework-agnostic design system
This commit is contained in:
parent
e12ec8681b
commit
c251ead206
23 changed files with 1285 additions and 0 deletions
24
packages/css/script/publish.ts
Normal file
24
packages/css/script/publish.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env bun
|
||||
|
||||
import { Script } from "@opencode-ai/script"
|
||||
import { $ } from "bun"
|
||||
import { rm } from "node:fs/promises"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
||||
process.chdir(fileURLToPath(new URL("..", import.meta.url)))
|
||||
|
||||
const pkg = (await Bun.file("package.json").json()) as { name: string; version: string }
|
||||
const tarball = `${pkg.name.replace("@", "").replace("/", "-")}-${pkg.version}.tgz`
|
||||
|
||||
if ((await $`npm view ${pkg.name}@${pkg.version} version`.nothrow()).exitCode === 0) {
|
||||
console.log(`already published ${pkg.name}@${pkg.version}`)
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
try {
|
||||
await $`bun run test`
|
||||
await $`bun pm pack`
|
||||
await $`npm publish ${tarball} --access public --tag ${Script.channel}`
|
||||
} finally {
|
||||
await rm(tarball, { force: true })
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue