Skip to content

Commit

Permalink
docs: polished the Develop section (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zizzamia authored Nov 17, 2023
1 parent 6d05911 commit 050cdd8
Show file tree
Hide file tree
Showing 6 changed files with 319 additions and 539 deletions.
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Code of Conduct for [Your Project Name]
# Code of Conduct for Build Onchain Apps

## 1. Purpose

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This project and everyone participating in it are governed by our [Code of Condu

### Pull Requests

1. **Fork the repository** and create your branch from `master`.
1. **Fork the repository** and create your branch from `main`.

2. **Make your changes**: Apply your changes, following the coding conventions described below.

Expand Down
49 changes: 25 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

> The easier way to build onchain apps.
<br />
<br />

Building an Onchain Application can feel overwhelming due to the many libraries, best practices, and choices developers and entrepreneurs must make. **Build Onchain Apps** as a library focuses on automating and simplifying the creation of new Onchain Apps and enhancing existing ones.
Expand All @@ -23,47 +22,49 @@ If you've previously installed `@base-org/build-onchain-apps` globally via `npm

_([npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) comes with npm 5.2+ and higher, see [instructions for older npm versions](https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f))_

## Contribution
<br >

## Contributing ☕️ 🔵

The main purpose of this repository is to continue evolving Build Onchain Apps, making it better and easier to use. Development of React happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving Build Onchain Apps.


### [Code of Conduct](CODE_OF_CONDUCT.md).
Build Onchain Apps has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

We welcome contributions to Build Onchain Apps! ☕️ 🔵
To contribute, please see [CONTRIBUTING.md](CONTRIBUTING.md).

### Development
### [Contributing Guide](CONTRIBUTING.md).
Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Build Onchain Apps.

For all available scripts, check the [package.json](https://github.com/base-org/build-onchain-apps/blob/main/package.json), but if you don't know where to start, here are some useful ones.
### Develop

To build and test the package locally use these quick steps

```bash
## Quick Start
# Clone the repo
git clone https://github.com/base-org/build-onchain-apps.git
cd build-onchain-apps
yarn
```

> Do not use npm to install the dependencies, as the specific package versions in `yarn.lock` are used to build and test build-onchain-apps.
To build the compiler and all the other modules included in the package:
# Run initial install
yarn

```bash
# Build all dependencies
yarn build
```

### Testing Locally

To test the package locally, use `npm link` to link the local package to the global npm registry.

```bash
yarn build
## Test Local Package
# Link the local package to the global npm registry
npm link
# Call CLI using the following command
build-onchain-apps create
```

After you are done testing, you can unlink the package from the global npm registry.
# Test CLI using the local package
build-onchain-apps create

```bash
# After testing, unlink the package from the global npm registry
npm unlink @base-org/build-onchain-apps
```

### Adding new templates
#### Adding new templates

To make a new template, make a folder for it in the `templates` folder and set up your project there. Treat each template like its own Node.js project and run the commands in its folder.

Expand Down
3 changes: 2 additions & 1 deletion src/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
import { isRootDirWriteable, getProjectDir } from './utils/dir';

/**
* This function is responsible for copying the onchain template and create new project.
* Responsible for copying the
* onchain template and create new project.
*/
export const createProject = async (templateName: string) => {
// Check if the current directory is writeable
Expand Down
2 changes: 1 addition & 1 deletion src/utils/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const updatePackageJson = (
export const displayFinalInstructions = (appName: string) => {
console.log(chalk.green(`🚀 Project '${appName}' created successfully!`));
console.log(
chalk.blue(`Type 'cd ${appName}' to navigate into your new project.`)
chalk.blue(`Type 'cd apps/${appName}' to navigate into your new project.`)
);
console.log(chalk.blue(`Run 'yarn' to install dependencies.`));
console.log(chalk.blue(`Run 'yarn dev' to start the development server.`));
Expand Down
Loading

0 comments on commit 050cdd8

Please sign in to comment.