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

Use common development environment from NC suggestions #1440

Merged
merged 4 commits into from
Jan 14, 2023
Merged
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
2 changes: 2 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ rules:
- error
- allowForLoopAfterthoughts: true

root: true

settings:
"import/resolver":
alias:
Expand Down
22 changes: 11 additions & 11 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Xdebug on 9000",
"type": "php",
"request": "launch",
"port": 9000,
"pathMappings": {
"/var/www/html/custom_apps/cookbook": "${workspaceFolder:cookbook}",
"/var/www/html": "${workspaceFolder:base}"
}
},
//{
// "name": "Xdebug on 9000",
// "type": "php",
// "request": "launch",
// "port": 9000,
// "pathMappings": {
// "/var/www/html/custom_apps/cookbook": "${workspaceFolder:cookbook}",
// "/var/www/html": "${workspaceFolder:base}"
// }
//},
{
"name": "Xdebug on 9003",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/var/www/html/custom_apps/cookbook": "${workspaceFolder:cookbook}",
"/var/www/html/apps-extra/cookbook": "${workspaceFolder:cookbook}",
"/var/www/html": "${workspaceFolder:base}"
}
}
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"less.validate": false,
"scss.validate": false,
"intelephense.environment.includePaths": [
"../../base/lib",
"../../lib",
],
"intelephense.files.exclude": [
"**/.git/**",
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

### Fixed
- Make "None" category string translatable
[1323](https://github.com/nextcloud/cookbook/pull/1344) @seyfeb
[#1323](https://github.com/nextcloud/cookbook/pull/1344) @seyfeb

### Maintenance
- Update dependency for GitHub pages builder
- Fix package.json sort order
- Migrate the dev environment to [docker-dev by Julius Haertl](https://github.com/juliushaertl/nextcloud-docker-dev)
[#1440](https://github.com/nextcloud/cookbook/pull/1440) @christianlupus


## 0.10.1 - 2022-11-09
Expand Down
15 changes: 1 addition & 14 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,4 @@

We are happily accepting code contributions of different types. Here are some hints on this.

## Development environment

For now, there is no included documentation on how to setup your environment best.

You might however have alook at [this repository](https://github.com/christianlupus/nextcloud-docker-debug).
It describes **one** way to get a running development environment for the app.

## Unit tests and code coverage

Currently there is a github action in place that does automatic unit testing upon pushing to github.
These tests are generating code coverage reports as well.

Firstly, for each such run (see in the actions view or the PR tests) there is the option to download the code coverage as zipped HTML page.
Secondly, the [codecov.io service](https://codecov.io/gh/nextcloud/cookbook) is installed, where more details about the coverage can be found.
Please have a look at the [developer documentation](https://nextcloud.github.io/cookbook/dev/) in general and about [contributing](https://nextcloud.github.io/cookbook/dev/contributing/).
3 changes: 2 additions & 1 deletion cookbook.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"path": "."
},
{
"path": "../../base"
"path": "../..",
"name": "base"
},
{
"path": "tests/phpunit/vendor",
Expand Down
7 changes: 7 additions & 0 deletions docs/dev/contributing/code_coverage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Unit tests and code coverage

Currently there is a github action in place that does automatic unit testing upon pushing to github.
These tests are generating code coverage reports as well.

Firstly, for each such run (see in the actions view or the PR tests) there is the option to download the code coverage as zipped HTML page.
Secondly, the [codecov.io service](https://codecov.io/gh/nextcloud/cookbook) is installed, where more details about the coverage can be found.
5 changes: 5 additions & 0 deletions docs/dev/contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ If you need additional information or find any missing parts, feel free to conta
## Coding
The first step, when you want to help with coding on the app, will be to setup your development environment.
We prepared a [page on the setup](setup) to help you get started with the technical requirements.
See also the page on [code coverage](code_coverage).

## Translating
Feel free to have a look at the [transifex page on the cookbook app](https://www.transifex.com/nextcloud/nextcloud/cookbook/).
Any translations done there will be synchronized on a nightly base.

## Documentation
We also need helpers in writing documentation for various levels and user groups.
If you think you can help by writing appropriate documentation or tutorials, feel free to step forward.
8 changes: 1 addition & 7 deletions docs/dev/contributing/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ You might need to adopt the path specification according to your local setup. Al

Be sure to recreate the containers after modifying `docker-compose.yml` using `docker-compose up -d`.

### Usage of [nextcloud-docker-debug](https://github.com/christianlupus/nextcloud-docker-debug) by christianlupus

The installation process is described in the README of that project. Feel free to contact the author in cases of problems.

## Install PHP dependencies

The app needs some depdencies in the PHP backend. These are managed via [composer](http://composer.org). Make sure, you have composer ready on your development machine.
Expand All @@ -63,11 +59,9 @@ The frontend is based on Vue. Some Javascript/NPM dependencies are needed in ord

Open a terminal to the directory where you cloned the cookbook app. Then download the dependencies with:
```
npm install
npm ci
```

To reset you can remove the folder `node_modules` and the file `package-lock.json`. Then you can install all packages from scratch.

## Create the bundled assets for the frontend

Use the NPM script to prepare the Webpack bundle:
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const isDev = buildMode === 'development'

function cookbookConfig (env) {
const config = merge(webpackConfig, {
context: path.resolve(__dirname),
entry: {
guest: path.resolve(path.join('src', 'guest.js')),
},
Expand Down