File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 99} from 'builders/util'
1010import { exec } from 'child_process'
1111import { PACKAGE_OUTPUT } from 'consts'
12+ import { promises as fs } from 'fs'
1213import type { Bundler } from 'types'
1314import { promisify } from 'util'
1415
@@ -40,6 +41,16 @@ export const simpleBuild = async (
4041 ) {
4142 throw `Failed to generate package.json file.`
4243 }
44+
45+ // Copy README.md to dist
46+ try {
47+ await fs . copyFile (
48+ `${ libDirectory } /README.md` ,
49+ `${ libDirectory } /${ PACKAGE_OUTPUT } /README.md`
50+ )
51+ } catch ( e ) {
52+ console . error ( `❌ Failed to copy README.md to dist:` , e )
53+ }
4354 console . log ( `✅ Package successfully built.` )
4455 } catch ( err ) {
4556 // Handle on error.
Original file line number Diff line number Diff line change @@ -61,6 +61,13 @@ export const build = async () => {
6161 throw `Failed to generate package.json file.`
6262 }
6363
64+ // Copy README.md to dist
65+ try {
66+ await fs . copyFile ( 'README.md' , `${ PACKAGE_OUTPUT } /README.md` )
67+ } catch ( e ) {
68+ console . error ( `❌ Failed to copy README.md to dist:` , e )
69+ }
70+
6471 // Remove tmp build directory if it exists.
6572 if ( ! ( await removePackageOutput ( '.' , true ) ) ) {
6673 console . error ( `❌ Failed to remove tmp build directory.` )
Original file line number Diff line number Diff line change 11{
22 "name" : " @w3ux/crypto-source" ,
33 "description" : " Cryptographic utilities for Dapps" ,
4- "version" : " 1.0.2 " ,
4+ "version" : " 1.0.4 " ,
55 "license" : " GPL-3.0-only" ,
66 "type" : " module" ,
77 "keywords" : [
You can’t perform that action at this time.
0 commit comments