@@ -5,9 +5,6 @@ const path = require('node:path');
55
66const { build } = require ( 'tsup' ) ;
77
8- const { buildLogos } = require ( './build-logos' ) ;
9- const { buildProducts } = require ( './build-products' ) ;
10-
118const main = async ( ) => {
129 // Clean directories
1310 const dist = path . join ( __dirname , '../dist' ) ;
@@ -27,10 +24,6 @@ const main = async () => {
2724 const { version } = JSON . parse ( fs . readFileSync ( path . join ( __dirname , '../package.json' ) , 'utf8' ) ) ;
2825 fs . writeFileSync ( sdkVersionPath , JSON . stringify ( { version } , null , 2 ) ) ;
2926
30- // Build assets
31- await buildLogos ( ) ;
32- await buildProducts ( ) ;
33-
3427 await build ( {
3528 entry : [ 'src/index.ts' ] ,
3629 format : [ 'cjs' , 'esm' ] ,
@@ -42,19 +35,6 @@ const main = async () => {
4235 publicDir : 'public' ,
4336 } ) ;
4437
45- // Copy over all processed logo files to dist
46- const logosOutDir = path . join ( dist , 'logos' ) ;
47- const logosSrcDir = path . join ( __dirname , '../generated/logos' ) ;
48- fs . mkdirSync ( logosOutDir ) ;
49- const logoDirents = await fs . promises . readdir ( logosSrcDir , { withFileTypes : true } ) ;
50- for ( const dirent of logoDirents ) {
51- if ( dirent . isFile ( ) ) {
52- const source = path . join ( logosSrcDir , dirent . name ) ;
53- const dest = path . join ( logosOutDir , dirent . name ) ;
54- fs . copyFileSync ( source , dest ) ;
55- }
56- }
57-
5838 // Copy addresses from @nexusmutual /deployments package
5939 const addressesFile = path . join ( __dirname , '../node_modules/@nexusmutual/deployments/dist/data/addresses.json' ) ;
6040 const dataOutDir = path . join ( dist , 'data' ) ;
@@ -74,12 +54,8 @@ const main = async () => {
7454 }
7555 }
7656
77- // Copy products.json and product-types.json from generated to dist
78- const generatedDir = path . join ( __dirname , '../generated' ) ;
79- fs . copyFileSync ( path . join ( generatedDir , 'products.json' ) , path . join ( dist , 'data/products.json' ) ) ;
80- fs . copyFileSync ( path . join ( generatedDir , 'product-types.json' ) , path . join ( dist , 'data/product-types.json' ) ) ;
81-
8257 // Copy version.json from generated to dist
58+ const generatedDir = path . join ( __dirname , '../generated' ) ;
8359 fs . copyFileSync ( path . join ( generatedDir , 'version.json' ) , path . join ( dist , 'data/version.json' ) ) ;
8460} ;
8561
0 commit comments