Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 28 additions & 25 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ If you find a bug in the source code or a mistake in the documentation, you can

**Please see the Submission Guidelines below**.

## <a name="bounties"></a> Bug bounties

If you submitted a Pull Request that fixes a ticket with the "\$100" tag, then you are eligible for our bug bounty program! Go to our [bug bounties documentation](https://www.jhipster.tech/bug-bounties/) for more information, and claim your money.

## <a name="feature"></a> Feature Requests

You can request a new feature by submitting a ticket to our [GitHub issues](https://github.com/jhipster/generator-jhipster/issues). If you
Expand All @@ -37,26 +33,6 @@ would like to implement a new feature then consider what kind of change it is:
- **Major Changes** that you wish to contribute to the project should be discussed first. Please open a ticket which clearly states that it is a feature request in the title and explain clearly what you want to achieve in the description, and the JHipster team will discuss with you what should be done in that ticket. You can then start working on a Pull Request. In order to communicate major changes proposals and receive reviews from the core team, you can also submit an RFC.
- **Small Changes** can be proposed without any discussion. Open up a ticket which clearly states that it is a feature request in the title. Explain your change in the description, and you can propose a Pull Request straight away.

## <a name="rfcs"></a> RFCs

Sometimes, major feature requests are "complex" or "substantial". In this case, GitHub Issues might not be the best tool to present them because we will need a lot of going back and forth to reach a consensus.

So we ask that these feature request be put through a formal design process and have their specifications described in an "RFC" (request for comments) that will be validated by the team through a Pull Request Review.

The RFC process is intended to provide a consistent and controlled path for major features and directions of the project.

To submit an RFC follow those steps:

1. Discuss the RFC proposal with the core team through GitHub issues or other channels
2. Create the initial GitHub issue for the Feature Request if it doesn't already exist
3. Copy the `rfcs/0-jhipster-rfc-template.md` to `rfcs/${featureRequestIssueNumber}-my-feature-request-name.md`
4. Fill in the RFC, make sure to complete every required section
5. Submit the RFC as a Pull Request with the summary of the proposal in the PR description
6. Build consensus and integrate feedback from the reviewers
7. The Pull Request is either accepted (merged), rejected (closed) or postponed (given an "on hold" status)

Note: The JHipster RFC process is inspired by [Rust RFCs](https://rust-lang.github.io/rfcs/).

## <a name="submit"></a> Submission Guidelines

### [Submitting an Issue](https://opensource.guide/how-to-contribute/#opening-an-issue)
Expand Down Expand Up @@ -88,13 +64,16 @@ You can run `jhipster info` in your project folder to get most of the above requ

Issues opened without any of these info will be **closed** without any explanation.

## Development environment setup

See our [Development Guide](DEVELOPMENT.md) for more information on how to configure the jhipster generator for contributing.

### [Submitting a Pull Request](https://opensource.guide/how-to-contribute/#opening-a-pull-request)

Before you submit your pull request consider the following guidelines:

- Search [GitHub](https://github.com/jhipster/generator-jhipster/pulls?utf8=%E2%9C%93&q=is%3Apr) for an open or closed Pull Request
that relates to your submission.
- If you want to modify the JHipster generator, read our [Development Guide](DEVELOPMENT.md)
- Follow our [Coding Rules](#rules).
- In GitHub, send a pull request to `jhipster/generator-jhipster:main`.
- **Every CI tests must pass**.
Expand Down Expand Up @@ -183,3 +162,27 @@ or joined the [JHipster team](https://www.jhipster.tech/team/).

[issue-template]: https://github.com/jhipster/generator-jhipster/issues/new?template=BUG_REPORT.md
[feature-template]: https://github.com/jhipster/generator-jhipster/issues/new?template=FEATURE_REQUEST.md

## <a name="rfcs"></a> RFCs

Sometimes, major feature requests are "complex" or "substantial". In this case, GitHub Issues might not be the best tool to present them because we will need a lot of going back and forth to reach a consensus.

So we ask that these feature request be put through a formal design process and have their specifications described in an "RFC" (request for comments) that will be validated by the team through a Pull Request Review.

The RFC process is intended to provide a consistent and controlled path for major features and directions of the project.

To submit an RFC follow those steps:

1. Discuss the RFC proposal with the core team through GitHub issues or other channels
2. Create the initial GitHub issue for the Feature Request if it doesn't already exist
3. Copy the `rfcs/0-jhipster-rfc-template.md` to `rfcs/${featureRequestIssueNumber}-my-feature-request-name.md`
4. Fill in the RFC, make sure to complete every required section
5. Submit the RFC as a Pull Request with the summary of the proposal in the PR description
6. Build consensus and integrate feedback from the reviewers
7. The Pull Request is either accepted (merged), rejected (closed) or postponed (given an "on hold" status)

Note: The JHipster RFC process is inspired by [Rust RFCs](https://rust-lang.github.io/rfcs/).

## <a name="bounties"></a> Bug bounties

If you submitted a Pull Request that fixes a ticket with the "\$100" tag, then you are eligible for our bug bounty program! Go to our [bug bounties documentation](https://www.jhipster.tech/bug-bounties/) for more information, and claim your money.
24 changes: 23 additions & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Go to the [generator-jhipster project](https://github.com/jhipster/generator-jhi
### Set `jhipster` command to use the cloned project

Since v8 `generator-jhipster` is written in TypeScript.
To run it you need to compile to JavaScript or use a just-in-time compilation.
To run it you need to compile to JavaScript or use a just-in-time compilation. `npm run compile` will be your best friend here: see [package.json script section](./package.json) for the entire list of commands.

#### Running jit executable

Expand All @@ -41,6 +41,17 @@ In your cloned `generator-jhipster` project, run `npm ci` and then run `npm link

For testing, you will want to generate an application, and there is a specific issue here: for each application, JHipster installs a local version of itself. This is made to enable several applications to each use a specific JHipster version (application A uses JHipster 3.1.0, and application B uses JHipster 3.2.0).

#### Generating new applications from the tests samples using node bin/jhipster.cjs

To generate a new application, you can run the following command in your terminal:

```shell
node bin/jhipster.cjs generate-sample ng-default --global
```
From the root of your cloned `generator-jhipster` project, this will generate a sample application in the current folder using the local version of JHipster. ng-default is the name of the sample application, you can replace it with any other sample name in the [code samples](./test-integration/samples) to generate a sample application. By default, the sample will be generated in the `../jhipster-samples` folder.
For workspaces, an additional `jhipster-samples.code-workspace` file will be generated in the same folder, which can be used to open the samples in a single VSCode workspace. Still, you'll need to delete the `jhipster-samples.code-workspace` file if you want to generate another workspace sample in the same folder.

#### Generating a new application using npm link
To overcome this, you need to run `npm link generator-jhipster` on the generated project folder as well, so that the local version has a symbolic link to the development version of JHipster.
Also add the option `--skip-jhipster-dependencies` to generate the application ignoring the JHipster dependencies (otherwise a released version will be installed each time npm install/ci is called). You can later on re-add the dependency with the command `jhipster --no-skip-jhipster-dependencies`.

Expand Down Expand Up @@ -95,6 +106,16 @@ To start debugging JHipster with **VSCode**, open the generator code in your wor

It is also possible to debug sub generators by selecting one of the other debug options (for example `jhipster entity`). Those debug configurations are specified in the `.vscode/launch.json` file.

#### Debugging with IntelliJ IDEA

When you start intelliJ IDEA on the `generator-jhipster` project, you'll have access to a run configuration letting execute any `.spec.ts` file within any package.
If you want to test a specific generator, you can create a new node.js run configuration with the following settings:
```
application-parameters="generate-sample ms-ng-oauth2-mongodb-caffeine --global" path-to-js-file="bin/jhipster.cjs" typescript-loader="bundled" working-dir="$PROJECT_DIR$"
```

ms-ng-oauth2-mongodb-caffeine is the name of the sample application, you can replace it with any other sample name in the [code samples](./test-integration/samples) to generate a sample application. By default, the sample will be generated in the `../jhipster-samples` folder.

## Generator implementation

### important config objects
Expand Down Expand Up @@ -152,6 +173,7 @@ npm run ci:e2e:package # Builds the application
npm run ci:e2e:prepare # Starts the application using docker
npm run ci:e2e:run # Runs e2e tests
```
List of commands being in the package.json scripts section of the generated sample.

## DX using vscode

Expand Down
Loading