Skip to content

Commit d6624f2

Browse files
authored
Merge pull request #1 from biigle/es6
ES6
2 parents 654773a + 57fbd16 commit d6624f2

File tree

14 files changed

+10776
-77
lines changed

14 files changed

+10776
-77
lines changed

.eslintrc.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2020": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:vue/essential"
9+
],
10+
"parserOptions": {
11+
"ecmaVersion": 11,
12+
"sourceType": "module"
13+
},
14+
"plugins": [
15+
"vue"
16+
],
17+
"rules": {
18+
"no-prototype-builtins": "off",
19+
"no-console": ["error", {"allow": ["warn", "error"]}],
20+
"vue/require-v-for-key": "off"
21+
},
22+
"globals": {
23+
"biigle": "readonly",
24+
"Vue": "readonly",
25+
"VueStrap": "readonly"
26+
}
27+
}

.github/workflows/lint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
with:
17+
fetch-depth: 1
18+
19+
- name: Install dependencies
20+
run: npm install
21+
22+
- name: Run ESLint
23+
run: npm run lint

.github/workflows/test.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
11+
test-module:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v1
17+
with:
18+
fetch-depth: 1
19+
20+
- uses: actions/checkout@v1
21+
with:
22+
repository: biigle/core
23+
ref: dev-modules
24+
fetch-depth: 1
25+
path: core
26+
27+
- name: Validate composer.json and composer.lock
28+
run: composer validate
29+
working-directory: ../core
30+
31+
- name: Copy .env
32+
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
33+
working-directory: ../core
34+
35+
- name: Get Composer Cache Directory
36+
id: composer-cache
37+
run: |
38+
echo "::set-output name=dir::$(composer config cache-files-dir)"
39+
40+
- uses: actions/cache@v1
41+
with:
42+
path: ${{ steps.composer-cache.outputs.dir }}
43+
key: ${{ runner.os }}-composer
44+
restore-keys: |
45+
${{ runner.os }}-composer
46+
47+
- name: Install Dependencies
48+
run: composer install --no-ansi --no-interaction --no-scripts --no-suggest --prefer-dist --ignore-platform-reqs
49+
working-directory: ../core
50+
51+
- name: Remove BIIGLE modules
52+
run: rm -r vendor/biigle
53+
working-directory: ../core
54+
55+
- name: Update BIIGLE modules from source
56+
run: composer update --no-ansi --no-interaction --no-scripts --no-suggest --prefer-source --ignore-platform-reqs biigle/*
57+
working-directory: ../core
58+
59+
- name: Remove installed package
60+
run: rm -r vendor/${GITHUB_REPOSITORY}
61+
working-directory: ../core
62+
63+
- name: Copy current repository
64+
run: cp -r ${GITHUB_WORKSPACE} vendor/biigle
65+
working-directory: ../core
66+
67+
- name: Generate key
68+
run: php artisan key:generate
69+
working-directory: ../core
70+
71+
- name: Docker login
72+
run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p $GITHUB_TOKEN
73+
env:
74+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
75+
76+
- name: Fetch base images
77+
run: |
78+
docker pull docker.pkg.github.com/biigle/core/app:latest
79+
docker pull docker.pkg.github.com/biigle/core/worker:latest
80+
81+
- name: Start test database
82+
run: docker-compose up -d --no-build database_testing
83+
working-directory: ../core
84+
85+
- name: Run tests
86+
run: docker-compose run --rm -u 1001 worker php -d memory_limit=1G vendor/bin/phpunit --random-order --filter 'Biigle\\Tests\\Modules\\'${GITHUB_REPOSITORY##*/}
87+
working-directory: ../core

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ First, [create a new repository](https://github.com/biigle/module/generate) base
1818
6. [`ModuleServiceProvider.php#L42`](src/ModuleServiceProvider.php#L42)
1919
7. [`composer.json#L2`](composer.json#L2)
2020

21-
Next, update the namespace of all PHP classes (`Biigle\Modules\Module`) and replace `Module` with the name of your module. Do this in [`gulpfile.js`](gulpfile.js#L5), too. Now you can install the module and start developing.
21+
Next, update the namespace of all PHP classes (`Biigle\Modules\Module`) and replace `Module` with the name of your module. Do this in [`webpack.mix.js`](webpack.mix.js#L23), too. Now you can install the module and start developing.
2222

23-
In addition to the code of the [tutorials](https://biigle.de/manual#developer-tutorials) this repository already contains the configuration for [gulp.js](https://gulpjs.com/) as build system. To install the build system, run `npm install -g gulp-cli` and then run `npm install`. Now you can use the following build commands:
23+
In addition to the code of the [tutorials](https://biigle.de/manual#developer-tutorials) this repository already contains the configuration for [Laravel Mix](https://laravel.com/docs/6.x/mix) as build system. To install the build system, run and then run `npm install`. Now you can use the following commands:
2424

25-
- `gulp`: Builds and publishes the assets once.
26-
- `gulp --production`: Builds, minifies and publishes the assets once. Always do this before you commit new code.
27-
- `gulp watch`: Continuously builds and publishes the assets whenever an asset file is changed.
25+
- `npm run dev`: Builds and publishes the assets once.
26+
- `npm run prod`: Builds, minifies and publishes the assets once. Always do this before you commit new code.
27+
- `npm run watch`: Continuously builds and publishes the assets whenever an asset file is changed.
28+
- `npm run lint`: Run static analysis to check for errors.
2829

2930
## How wo install this module
3031

gulpfile.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)