generated from unplugin/unplugin-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Refactor package.json and add publish scripts (generate jsr fro…
…m package.json) This commit refactors the package.json file to simplify the exports section and adds new scripts for preparing the package for publishing. It also includes a new script file (gen_jsr_json.ts) that generates the jsr.json file needed for publishing. The .gitignore file has been updated to ignore the jsr.json and LICENSE files in the package directory.
- Loading branch information
Showing
5 changed files
with
44 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/jsr.json | ||
/LICENSE |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { join } from 'node:path'; | ||
import { | ||
exports, | ||
files, | ||
name, | ||
version, | ||
} from '../package.json'; | ||
|
||
const jsrJSON = { | ||
version, | ||
name, | ||
exports, | ||
publish: { | ||
include: files, | ||
}, | ||
} as const; | ||
|
||
const exportJSRPath = join(import.meta.dirname, '../jsr.json'); | ||
|
||
await Bun.write(exportJSRPath, JSON.stringify(jsrJSON, null, '\t')); |