There's more...

You can build your own box for Truffle. You can either start your project from scratch or add the necessary configuration files required to convert your project to a box. Follow these steps to create and upload your box to the Truffle repository:

  1. Download the blueprint box to get started. It contains the basic files and configuration to make your life easier.

  2. Every box includes a configuration file, truffle-config.js, which include the hooks, commands, and ignore attributes.

  3. The ignore array contains the list of files that should be ignored while unboxing. Common examples are the readme and gitignore files:

ignore: [ 'README.md' ]
  1. hooks is an object that contains a list of tasks to perform after unboxing. A common example would be npm install:
hooks: { 
'post-unpack': 'npm install'
}
  1. To give the user an idea about the list of commands supported by your box, you can use the commands object. It contains the list of commands the user can use and will be shown in the console after unboxing:
commands: { 
"Compile contracts": "truffle compile",
"Migrate contracts": "truffle migrate",
"Test Contracts": "truffle test",
"Test DApp": "npm test",
"Start development server": "npm run start",
"Build": "npm run build"
}
  1. To list your box in the Truffle portal, you may need to upload it to a published GitHub repository. You can also add your custom images (512px square with 32px padding and a 735px x 100px image with 32px left padding) to personalize it even more.

  2. The Truffle team verifies the quality and compatibility of each box. You may need to send an email to the Truffle team to  list your box in the official Truffle portal.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.239.41