Skip to content

Commit

Permalink
docs(app): improve developer guides for local development
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosanif committed Feb 19, 2025
1 parent e6bcd3b commit de5489b
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 32 deletions.
37 changes: 5 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,39 +64,12 @@ NGXS tries to make things as simple and accessible as possible. There can be a l

The idea with this github organisation is to provide a place for the community to create libraries that augment the main framework with functionality that does not need to be integrated directly into the framework and therefore can evolve through their initial iterations of experimentation without affecting the main @ngxs/store library.

### Getting Started - Local Development
### Developer Guides

#### Installation

To get started locally, follow these instructions:

1. If you haven't done it already, make a fork of this repo.
2. Clone to your local computer using git.
3. Make sure that you have installed NodeJS.
4. Make sure that you have yarn installed.
5. Run `yarn && yarn --cwd tutorials/create-app`.
6. Run `yarn build:packages`.

#### Creating new packages or add feature/fix

##### if you make changes @ngxs/store

1. Run development mode `yarn build:packages --package store --watch`
2. Run serve integration examples `yarn start`
3. **...development...**
4. Run tests `yarn test:ci`
5. Create pull request

##### if you add a new package @ngxs/my-super-plugin

1. Create a new project folder `packages/my-super-plugin`
2. Create template library with ngPackagr
3. Add your project to package.json
4. Run development mode `yarn build:packages --package my-super-plugin --watch`
5. **...development...**
6. Run build `yarn build:packages --package my-super-plugin`
7. Run tests `yarn test:ci`
8. Create pull request
- [Getting Started](docs/community-and-labs/community/developer-guide.md) - Installation and local development.
- [Contributing](docs/community-and-labs/community/contributing.md) - Learn how to contribute to the project.
- [Style Guide](docs/style-guide.md) - Coding conventions and best practices.
- [Code of Conduct](CODE_OF_CONDUCT.md) - Contributor Code of Conduct.

#### NGXS Labs

Expand Down
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
- [COMMUNITY](community-and-labs/community/README.md)
- [FAQ](community-and-labs/community/faq.md)
- [Resources](community-and-labs/community/projects.md)
- [Developer Guide](community-and-labs/community/developer-guide.md)
- [Contributors](community-and-labs/community/contributors.md)
- [Contributing](community-and-labs/community/contributing.md)
- [Sponsors](community-and-labs/community/sponsors.md)
Expand Down
74 changes: 74 additions & 0 deletions docs/community-and-labs/community/developer-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Developer Guide

Welcome to the NGXS community! We're excited to have you here. This guide will help you set up your local development environment and contribute effectively. :rocket:

## Prerequisites

Before you begin, ensure you have met the following requirements:

- You have installed [**Node.js**](https://nodejs.org/)
- You have installed [**Yarn**](https://yarnpkg.com/)

## Installation

Follow these steps to set up your local environment:

1. Fork the repository if you haven't already. [Learn how](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo).
2. Clone the forked repository to your local machine using git.
3. Install project dependencies:

```bash
# Install root dependencies
yarn install

# Install dependencies for the "create-app" tutorial
yarn --cwd tutorials/create-app
```

4. Build all packages:
```bash
yarn build:packages
```

## Developing and Contributing

If you want to contribute to the project by fixing bugs, adding new features, or creating new packages, follow the steps below.

### Modifying `@ngxs/store`

1. Run development mode:
```bash
yarn build:packages --package store --watch
```
2. Run serve integration examples:
```bash
yarn start
```
3. **Make your changes...**
4. Run tests to ensure everything works correctly:
```bash
yarn test
```
5. Commit changes following the [Conventional Commits](https://www.conventionalcommits.org/) format.
6. Create a **pull request** with a detailed description of the changes.

### Adding a New Package: `@ngxs/<my-super-plugin>`

1. Create a new package directory `packages/<my-super-plugin>`.
2. Create a template library with `ngPackagr`.
3. Add the package to `package.json` at the root level.
4. Run development mode:
```bash
yarn build:packages --package <my-super-plugin> --watch
```
5. **Develop your plugin...**
6. Build the package:
```bash
yarn build:packages --package <my-super-plugin>
```
7. Run tests to ensure everything works correctly:
```bash
yarn test
```
8. Commit changes following the [Conventional Commits](https://www.conventionalcommits.org/) format.
9. Create a **pull request** with a detailed description of the changes.

0 comments on commit de5489b

Please sign in to comment.