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

Globotree #670

Open
wants to merge 14 commits into
base: master
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
31 changes: 31 additions & 0 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Laravel

on: [push]

jobs:
laravel-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Generate key
run: php artisan key:generate
- name: Create Database
run: |
mkdir -p database
touch database/database.sqlite
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: vendor/bin/phpunit
- name: Upload artifact
uses: actions/[email protected]
with:
# Artifact name
name:
# Directory containing files to upload
path:
12 changes: 10 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Development

A few notes regarding developing Form Tools. Up until 3.0.14 it was just a question of cloning the repo and loading it
up in your browser, but now we're finally adding a proper build process.

up in your browser, but now we've finally adding a proper build process.

### Technologies

- grunt
- yarn
- webpack

### Local development

Expand All @@ -25,6 +25,14 @@ That generates the `dist/` folder and sets up watchers to copy over any edited f
edit files in your `src/` folder. You'll probably want to tell your IDE to ignore the dist folder contents so you don't
accidentally find yourself editing those files.

Also, add the following line to the generated `config.php` file in `dist/global` folder.

```php
$g_dev_mode = true;
```

That is used to load local resources rather than bundled ones.

### Linking components (modules, themes, API) for local development

Each component is in its own repo, but for seeing them in your local dev environment they needs to be copied over
Expand Down
4 changes: 4 additions & 0 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ const config = {
modules: {
files: active_modules.map((folder) => path.resolve(__dirname, '..', folder) + '/**'),
tasks: ['sync']
},
api: {
files: [path.resolve(__dirname, '..', active_api) + '/**'],
tasks: ['sync']
}
},

Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@
"@babel/preset-env": "^7.5.5",
"@babel/preset-react": "^7.0.0",
"autoprefixer": "^9.1.0",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.6",
"css-loader": "^3.2.0",
"eslint": "^6.5.1",
"eslint-plugin-react": "^7.16.0",
"exec": "^0.2.1",
"grunt": "^1.0.3",
"grunt-cli": "^1.2.0",
Expand All @@ -114,6 +117,7 @@
"reselect": "^3.0.1",
"resolve-url-loader": "^3.1.0",
"sass-loader": "^7.2.0",
"sinon": "^7.5.0",
"style-loader": "^1.0.0",
"webpack": "^4.39.2",
"webpack-cli": "^3.3.7"
Expand Down
6 changes: 5 additions & 1 deletion src/admin/modules/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
// Hacky patch. Longer term plan, see: https://github.com/formtools/core/issues/82
$localized_modules = array();
foreach ($modules as $module_info) {
$module = Modules::getModuleInstance($module_info["module_folder"]);
$module_folder = $module_info["module_folder"];
if (!Modules::isValidModule($module_folder)) {
continue;
}
$module = Modules::getModuleInstance($module_folder);
$module_info["module_name"] = $module->getModuleName();
$module_info["description"] = $module->getModuleDesc();
$localized_modules[] = $module_info;
Expand Down
50 changes: 0 additions & 50 deletions src/global/api/README.md

This file was deleted.

4 changes: 0 additions & 4 deletions src/global/api/index.php

This file was deleted.

Loading