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

Feature/custom dest folder #119

Merged

Conversation

germain-italic
Copy link
Collaborator

This PR lets you set a custom folder for generated CRUD pages!


Custom directory

  • Simply type the relative destination folder name (Suggestion - Add path in config file for pages to generate into.  #30)
  • Automatic sanitizing of the folder name (special characters)
  • Blacklist for reserved folder names
  • One can decide to add the CRUD files to .gitignore or not
  • Users can restart more easily after CRUD generations
  • Cruddiy can reload the config files from any core/subdirectory
  • But it can also generate the CRUD outside core (no reloading, thought)

Warning: depending on your web server configuration (Directory Index), if you generate outsite the project root directory or the core folder, your CRUD pages may not be accessible in the browser.


Blacklist for reserved folder names

Users are not allowed to name their folder after existing directories such as "core", "locales", "tests"

Config reloading

Since PR #73 Cruddiy remembers the config from the previous run of the generator.

However, what happens when there runs in different directories?

If you generated into core/, Cruddiy will parse subfolders and let you decide which config you want to reload:

This works from any page: core/index.php, core/tables.php, core/columns.php...

We could eventually let users select a directory outside core if there is demand for that.


Restart after generation

It's easier now:

You can even restart from scratch if you don't want to re-use any previous run.


Also in this PR

  • 7f2e421 • Error messages when database, username, password are empty

  • Explicitely stating the default value for pagination

  • e7194f7 • Updated tests for the generator
  • 1c46986 • Updated tests for the generated CRUD pages
  • 6fe65f6 • Updated code coverage
  • 5e0db3b • Bugfix: APP_NAME was not replaced if only one table is selected
  • 6fb8477 • Bootstrap 4 "muted" text style for hints

Please comment or open tickets if you spot any bug.

Happy CRUDing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant