File tree Expand file tree Collapse file tree 3 files changed +29
-6
lines changed Expand file tree Collapse file tree 3 files changed +29
-6
lines changed Original file line number Diff line number Diff line change 20
20
"url" : " https://github.com/cosmology-tech/hyperweb/issues"
21
21
},
22
22
"scripts" : {
23
- "copy" : " copyfiles -f LICENSE README.md package.json dist" ,
24
- "clean" : " rimraf dist/**" ,
25
- "prepare" : " npm run build" ,
26
- "build" : " npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy" ,
23
+ "clean" : " rimraf contracts/**" ,
24
+ "build" : " ts-node scripts/build.ts" ,
27
25
"test" : " jest --verbose --bail" ,
28
26
"test:debug" : " jest --runInBand --verbose --bail" ,
29
27
"starship" : " starship --config configs/local.yaml" ,
30
28
"starship:ci" : " starship --config configs/ci.yaml"
31
29
},
32
30
"devDependencies" : {
31
+ "@types/node" : " ^22.7.4" ,
33
32
"@types/jest" : " ^29.5.11" ,
34
33
"@typescript-eslint/eslint-plugin" : " ^6.18.1" ,
35
34
"@typescript-eslint/parser" : " ^6.18.1" ,
36
- "copyfiles" : " ^2.4.1" ,
37
35
"eslint-config-prettier" : " ^9.1.0" ,
38
36
"eslint-plugin-simple-import-sort" : " ^10.0.0" ,
39
37
"eslint-plugin-unused-imports" : " ^3.0.0" ,
Original file line number Diff line number Diff line change
1
+ import { join } from 'path' ;
2
+ import { InterwebBuild , InterwebBuildOptions } from '@interweb/build' ;
3
+
4
+ const root = join ( __dirname , '/../' ) ;
5
+ const outputDir = join ( root , 'contracts' ) ;
6
+ const srcDir = join ( root , 'src' ) ;
7
+
8
+ async function main ( ) {
9
+ const outfile = join ( outputDir , 'bundle.js' ) ;
10
+
11
+ const options : Partial < InterwebBuildOptions > = {
12
+ entryPoints : [ join ( srcDir , 'contract1/index.ts' ) ] ,
13
+ outfile,
14
+ external : [ 'otherpackage' , '~somepackage' ]
15
+ } ;
16
+
17
+ try {
18
+ await InterwebBuild . build ( options ) ;
19
+ console . log ( 'Build completed successfully!' ) ;
20
+ } catch ( error ) {
21
+ console . error ( 'Build failed:' , error ) ;
22
+ }
23
+ }
24
+
25
+ main ( ) . catch ( console . error ) ;
Original file line number Diff line number Diff line change 2020
2020
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca"
2021
2021
integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==
2022
2022
2023
- " @types/node@*" , "@types/node@>=13.7.0":
2023
+ " @types/node@*" , "@types/node@>=13.7.0", "@types/node@^22.7.4" :
2024
2024
version "22.7.4"
2025
2025
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.4.tgz#e35d6f48dca3255ce44256ddc05dee1c23353fcc"
2026
2026
integrity sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==
You can’t perform that action at this time.
0 commit comments