File tree Expand file tree Collapse file tree 4 files changed +27
-11
lines changed
Expand file tree Collapse file tree 4 files changed +27
-11
lines changed Original file line number Diff line number Diff line change 1919 - uses : actions/setup-node@v4
2020 with :
2121 registry-url : " https://registry.npmjs.org"
22+ - run : npm run release
2223 - run : npm install
2324 - run : npm run publish
2425 - run : cd ~/work/framework/framework/dist && npm publish --access public
Original file line number Diff line number Diff line change 2121 ],
2222 "scripts" : {
2323 "lint" : " eslint src/**/*.ts" ,
24+ "release" : " node ./scripts/release.js" ,
2425 "publish" : " node ./scripts/clean.js && node ./scripts/version.js && tsc && node ./scripts/publish.js" ,
2526 "test" : " vitest"
2627 },
Original file line number Diff line number Diff line change @@ -13,17 +13,10 @@ import { join } from "path";
1313 */
1414const execute = ( ) =>
1515{
16- const packageJson = JSON . parse (
17- readFileSync ( `${ process . cwd ( ) } /package.json` , { "encoding" : "utf8" } )
18- ) ;
19-
20- delete packageJson . peerDependencies ;
21- packageJson . dependencies = { "@next2d/player" : "*" } ;
22-
23- // write package.json
24- writeFileSync (
25- join ( process . cwd ( ) , "dist/package.json" ) ,
26- JSON . stringify ( packageJson , null , 2 )
16+ // package.json file
17+ spawnSync (
18+ `cp -r ${ process . cwd ( ) } /package.json ${ process . cwd ( ) } /dist/package.json` ,
19+ { "shell" : true }
2720 ) ;
2821
2922 // LICENSE
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+
3+ "use strict" ;
4+
5+ const execute = ( ) =>
6+ {
7+ const packageJson = JSON . parse (
8+ readFileSync ( `${ process . cwd ( ) } /package.json` , { "encoding" : "utf8" } )
9+ ) ;
10+
11+ delete packageJson . peerDependencies ;
12+ packageJson . dependencies = { "@next2d/player" : "*" } ;
13+
14+ // write package.json
15+ writeFileSync (
16+ join ( process . cwd ( ) , "package.json" ) ,
17+ JSON . stringify ( packageJson , null , 2 )
18+ ) ;
19+ } ;
20+
21+ execute ( ) ;
You can’t perform that action at this time.
0 commit comments