Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(#542): remove deprecated version key from ddev dockerfile, upda… #694

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
160 changes: 56 additions & 104 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,57 @@ title: Contributing
weight: 5
---

## Contributing

> All contributions are welcomed and appreciated.

Druxt is an open source project, built, supported and maintained by the community, for the community.
This guide provides an overview of the project, its development tools, and how to contribute.

* * *
-------------------

## Development Environment Setup
## How to Contribute

### Bug reports, feature requests

One of the easiest ways to contribute to Druxt is to open issues, giving as much detail as possible to make it easier other contributors and maintainers: http://github.com/druxt/druxt.js/issues/new/choose

When reporting bugs please make sure to provide detailed steps to reproduce the issue, and when possible provide a Gitpod workspace snapshot to demonstrate the issue.

-------------------

### Pull requests

If you are able to resolve an issue, or have improvements you would like to propose, use following process to create a Pull request:

1. If this a new issue, make sure to open a bug report or feature request.
2. Fork the repository.
3. Setup a development environment (see [steps below](#development-environment-setup)).
4. Make a `feature/#` branch from the `develop` branch.
5. Make and commit your changes.
6. Create a Pull request: https://github.com/druxt/druxt.js/compare

The Druxt development environment can be run both in the Cloud, using GitPod.io, or locally:
-------------------

* * *
## Development Environment Setup

### Gitpod

To start developing or testing Druxt, you can use Gitpod, a cloud-based IDE. All dependencies are pre-installed and configured to get started with Druxt development.

1. Go to the [druxt/druxt.js](https://github.com/druxt/druxt.js) and fork the repository. e.g., `https://github.com/USER/druxt.js`
2. Open the forked repository in GitPod by appending `https://gitpod.io#` to your GitHub repository. e.g., `https://gitpod.io#github.com/USER/druxt.js`
2. Open the forked repository in GitPod by prepending `https://gitpod.io#` to your GitHub repository. e.g., `https://gitpod.io#github.com/USER/druxt.js`
3. Wait patiently for the environment to setup...
4. Run DruxtSite example: `yarn example:druxt-site`

GitPod will automatically run the following tasks:
- Install all core dependencies: `yarn install`
- Build the Druxt modules: `yarn build`
- Geneate the documentation: `yarn build:docs`
- Start a Drupal backend: `cd docs/drupal && ddev start -y`
- Display a welcome message: `cat .gitpod/WELCOME.md`

* * *
- Install all core dependencies: `yarn install`
- Build the Druxt modules: `yarn build`
- Geneate the documentation: `yarn build:docs`
- Start a Drupal backend: `cd docs/drupal && ddev start -y`
- Display a welcome message: `cat .gitpod/WELCOME.md`

-------------------

### Local Development

Expand All @@ -38,32 +62,11 @@ GitPod will automatically run the following tasks:
3. Install dependencies: `yarn`
4. Build packages: `yarn build`
5. Start a Drupal backend (requires DDev): `cd docs/drupal && ddev start -y && ddev drupal-install`
6. Run DruxtSite example: `yarn example:druxt-site`

* * *

## Bug reports, feature requests

One of the easiest ways to contribute to Druxt is to open issues, giving as much detail as possible to make it easier other contributors and maintainers: http://github.com/druxt/druxt.js/issues/new/choose

When reporting bugs please make sure to provide detailed steps to reproduce the issue, and when possible provide a Gitpod workspace snapshot to demonstrate the issue.

* * *

## Pull requests

If you are able to resolve an issue, or have improvements you would like to propose, use following process to create a Pull request:

1. If this a new issue, make sure to open a bug report or feature request.
2. Fork the repository.
3. Setup a development environment (see [steps above](#development-environment-setup)).
4. Make a `feature/#` branch from the `develop` branch.
5. Make and commit your changes.
6. Create a Pull request: https://github.com/druxt/druxt.js/compare
6. Run DruxtSite example: `yarn example:druxt-site`

* * *
-------------------

## Example projects
## Example Projects

The Druxt monorepo contains a collection of example projects inside the aptly named "examples/" directory.

Expand All @@ -74,32 +77,28 @@ All examples use the Drupal instance located @ `docs/drupal` (`cd docs/drupal &&
### Custom module

This a a bare bones example of a custom DruxtModule.

`cd examples/custom-module && yarn && yarn dev`

### DruxtSite

This is an example of a basic, un-themed DruxtSite with support for authenticated users.

`yarn example:druxt-site`

### Entity form

A basic contact form example of the DruxtEntityForm component.

`cd examples/entity-form && yarn && yarn dev`

### Node client

A non-Nuxt example, using the DruxtClient in a basic node app.

`cd examples/node-client && yarn && yarn dev`

* * *
-------------------

## Development tools
## Development Tools

The Druxt repository is setup with tools and automated processes to help with development and to ensure a maintainable project:
The Druxt repository is set up with various tools to help with development and ensure a maintainable project:

- [Changesets](#changesets) - Changelog and versioning
- [Codecov](#codecov) - Automated code coverage
Expand All @@ -111,47 +110,32 @@ The Druxt repository is setup with tools and automated processes to help with de
- [Linting](#linting) - Coding styles and standards
- [Siroc](#siroc) - Zero-config build tools

* * *

### Changesets

Changesets is a tool to manage the mono-repo packages changelogs and versions.

If your changes are substantial, it is recommended to include a changeset. To do so, run the following command and follow the prompts:
Be sure to commit your changeset file alongside your changes. To do so, run the following command and follow the prompts:

```sh
yarn changeset
```

Be sure to commit your changeset file alongside your changes.

* * *

### Codecov

Codecov.io is used as part of the automated testing process to ensure that changes don't inadvertantly reduce the overall code coverage of the project.

The coverage report is generated as part of the [Jest](#jest) testing:
Codecov.io provides automated code coverage reporting. The coverage report is generated as part of the [Jest](#jest) testing:

```sh
yarn test
```

- For more details, refer to the [Druxt Codecov.io report](https://app.codecov.io/gh/druxt/druxt.js)

* * *
* For more details, refer to the [Druxt Codecov.io report](https://app.codecov.io/gh/druxt/druxt.js)

### Conventional commits
### Conventional Commits

> A specification for adding human and machine readable meaning to commit messages
Conventional Commits is a specification for adding human and machine-readable meaning to commit messages. A **husky** git hook enforces this standard.

The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of.

A **husky** git hook is used to ensure the standard is enforced, and will explain what changes to make as required.

- For more details, refer to the [Conventional Commits documentation](https://www.conventionalcommits.org/).

* * *
* For more details, refer to the [Conventional Commits documentation](https://www.conventionalcommits.org/).

### Cypress

Expand All @@ -161,77 +145,45 @@ Automated end-to-end testing is implemented using Cypress:
yarn test:e2e
```

- For more details, refer to the [Cypress documentation](https://docs.cypress.io/guides).

* * *
* For more details, refer to the [Cypress documentation](https://docs.cypress.io/guides).

### Docgen

Druxt uses a custom Docgen module to generate API documentation from the package source code, using a combination of **JSDoc** and the **Vue Docgen API**.

To build your changed documentation, run the following command:
Druxt uses a custom Docgen module to generate API documentation from source code. To build your changed documentation, run:

```sh
yarn build:docs
```

The documentation website is a Nuxt site located in the `/docs/nuxt` directory, to test your changes run the following command:
The documentation website is a Nuxt site located in the `/docs/nuxt` directory. To test your changes, run:

```sh
cd docs/nuxt && yarn dev
```

* * *

### Gitpod

The easiest way to develop or test Druxt is via Gitpod, a cloud based IDE.

All dependencies are pre-installed and configured to get started with Druxt development.

Click the button below to get started:

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/druxt/druxt.js)

* * *

### Jest

Automated testing is implemented using Jest.

It is recommended to run Jest in **watch** mode when making changes:
Automated unit testing is implemented using Jest. It's recommended to run Jest in **watch** mode when making changes:

```sh
yarn test --watch
```

Test files are located within the relevant packages `test` directories. E.g., `packages/druxt/test`

- For more details, refer to the [Jest documentation](https://jestjs.io/docs/getting-started).

* * *
* For more details, refer to the [Jest documentation](https://jestjs.io/docs/getting-started).

### Linting

Code styles and standards are enforced by linting tools, including **ESLint**.
Code styles and standards are enforced by linting tools, including **ESLint**. **Husky** triggers linting via a `pre-commit` git hook.

**Husky** is used to trigger linting via a `pre-commit` git hook to ensure all issues are flagged before they are committed.

You can also manually run linting using the following command:
You can manually run linting using:

```sh
yarn lint
```

* * *

### Siroc

> Zero Config Build Tool

Siroc is the build tool used for the Druxt mono-repo, used to compile the source code and build the required packages.

To build your changes, run Siroc using the following command:
Siroc is the build tool used for the Druxt mono-repo. To build your changes, run Siroc using:

```sh
yarn build --watch
Expand Down
37 changes: 16 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
# DruxtJS; A bridge between frameworks.
# DruxtJS

A bridge between frameworks.

[![npm](https://badgen.net/npm/v/druxt)](https://www.npmjs.com/package/druxt)
[![CircleCI](https://circleci.com/gh/druxt/druxt.js.svg?style=svg)](https://circleci.com/gh/druxt/druxt.js)
[![Cypress](https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/w4vd6v/develop&style=flat&logo=cypress)](https://dashboard.cypress.io/projects/w4vd6v/runs)
[![Known Vulnerabilities](https://snyk.io/test/github/druxt/druxt.js/badge.svg?targetFile=package.json)](https://snyk.io/test/github/druxt/druxt.js?targetFile=package.json)
[![codecov](https://codecov.io/gh/druxt/druxt.js/branch/develop/graph/badge.svg)](https://codecov.io/gh/druxt/druxt.js)


> Druxt = DRUpal + nUXT = Fully Decoupled Drupal.


## Links

- Documentation: https://druxtjs.org
- Community Discord server: https://discord.druxtjs.org
- Demo - Umami food magazine:
- https://umami.demo.druxtjs.org
- https://storybook.umami.demo.druxtjs.org
- Quickstart repositories:
- https://github.com/druxt/quickstart-druxt-site
- https://github.com/druxt/quickstart-druxt-site-tome
- https://github.com/druxt/quickstart-druxt-serverless

- **Documentation**: [https://druxtjs.org](https://druxtjs.org)
- **Community Discord server**: [https://discord.druxtjs.org](https://discord.druxtjs.org)
- **Demo - Umami food magazine**:
- [https://umami.demo.druxtjs.org](https://umami.demo.druxtjs.org)
- [https://storybook.umami.demo.druxtjs.org](https://storybook.umami.demo.druxtjs.org)
- **Quickstart repositories**:
- [https://github.com/druxt/quickstart-druxt-site](https://github.com/druxt/quickstart-druxt-site)
- [https://github.com/druxt/quickstart-druxt-site-tome](https://github.com/druxt/quickstart-druxt-site-tome)
- [https://github.com/druxt/quickstart-druxt-serverless](https://github.com/druxt/quickstart-druxt-serverless)

## Features

Expand All @@ -33,8 +32,7 @@
- Support for multilingual content.
- API and File proxy.

Learn more at https://druxtjs.org

Learn more at [https://druxtjs.org](https://druxtjs.org).

## Core modules

Expand All @@ -47,24 +45,21 @@ Learn more at https://druxtjs.org
- `druxt-site` - Out-of-the-box decoupled Drupal Site
- `druxt-views` - Decoupled Views


## Support

Find support or get involved in building Druxt via the community channels:

- [DruxtJS Discord server](https://discord.druxtjs.org)
- **#druxt** Slack channel on [Drupal.org slack](https://drupal.org/slack)


## Contributing

Druxt is an open source project, built by the comunity for the community.

See the [Contributing guide](./CONTRIBUTING.md) for details on how to #get-involved.
Druxt is an open source project, built by the community for the community.
See the [Contributing guide](./CONTRIBUTING.md) for details on how to get involved.

### Cloud development

This repository is setup for development in the cloud using [gitpod.io](https://gitpod.io), to get started, click the link below, or navigate to: https://gitpod.io/#https://github.com/druxt/druxt.js
This repository is set up for development in the cloud using [gitpod.io](https://gitpod.io). To get started, click the link below or navigate to: [https://gitpod.io/#https://github.com/druxt/druxt.js](https://gitpod.io/#https://github.com/druxt/druxt.js)

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/druxt/druxt.js)

Expand Down
4 changes: 2 additions & 2 deletions docs/drupal/.ddev/config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: druxtjs-drupal
type: drupal10
docroot: web
php_version: "8.2"
php_version: "8.4"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Reconsider PHP 8.4 upgrade

PHP 8.4 is currently in development and not recommended for production use. Consider using PHP 8.3 which is the latest stable version.

-php_version: "8.4"
+php_version: "8.3"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
php_version: "8.4"
php_version: "8.3"

webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
mariadb_version: "10.3"
mariadb_version: "10.6"
mysql_version: ""
nfs_mount_enabled: false
mutagen_enabled: false
Expand Down
2 changes: 0 additions & 2 deletions docs/drupal/.ddev/docker-compose.env.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.6'

services:
web:
env_file:
Expand Down
Loading
Loading