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

Optional installs of react, vue and bootstrap #20

Closed
apolopena opened this issue Feb 3, 2021 · 0 comments
Closed

Optional installs of react, vue and bootstrap #20

apolopena opened this issue Feb 3, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request gitpod-config Related to gitpod configuration (bash scripts etc...) Needs Official QA Dev QA is not always enough, this could use extra eyes on it. passed-dev-qa Optional state. Use this when QAing other peoples fixes in another branch.ready to be merged to main

Comments

@apolopena
Copy link
Owner

apolopena commented Feb 3, 2021

Problem this feature will solve

Since this is a configurable starter project it would be nice to have the ability to optionally install react and or vue and or bootstrap. We should be able to set the version and a flag to install the files for auth logins.

The version numbers should support Semantic Versioning.
An empty value for a version means no specific version will be set, rather use whatever version laravel/ui uses

Background

The current starter installs vanilla laravel so there is no react for the front end. Furthermore Laravel 8.x has some pretty hectic defaults as far as the learning curve goes (tailwindCSS. Jeststream, Breeze, inertia.js, only vue) and there is not out of the box option for react. With this system in place a user can use tools they are more familiaar with but keep all the great features core of Laravel 8.x

Proposed Solution

add the following configuration options to starter.ini

[react]
install=1
auth=0
version=

[vue]
install=0
auth=0
version=

[bootstrap]
install=0
auth=0
version=
  • 0 = true and 1 = false
  • If a value for version is not set then the version that laravel/ui installs by default will be used.
  • The react install supercedes the vue install
  • react and vue installs come with bootstrap so they supercede a bootstrap install
  • In starter.ini. auth and version are ignored if install is set to 0
    • The auth value will be ignored for bootstrap when either react or vue are installed.
  • install must either be set to 0 or 1 for any optional install

Constraints and Assumptions

Use laravel/ui:^3.2.0 since it is a legacy library now in Laravel 8.x

  • Installation of react will also install react-dom of the same version as specefied for react in starter.ini
  • Using artisan ui to install react and vue will also bring along alot of other packages. It will be at the users disgression to remove or upgrade and of them. Here is a typical list of packages from package json when react (without auth) is installed:
    "devDependencies": {
        "@babel/preset-react": "^7.0.0",
        "axios": "^0.21",
        "bootstrap": "^4.0.0",
        "jquery": "^3.2",
        "laravel-mix": "^6.0.6",
        "lodash": "^4.17.19",
        "popper.js": "^1.12",
        "postcss": "^8.1.14",
        "react": "16.14.0",
        "react-dom": "^16.2.0",
        "sass": "^1.15.2",
        "sass-loader": "^8.0.0"
    }

Alternatives or Workarounds

Install these packages manually.

Additional context

This feature should great deal flexibility to the starter and attract a wider user base. Users can get nitty gritty with the system and craft it as they like because that is the beauty of Laravel, however allowing and 'old school' front end swap like react and bootstrap to use in Laravel 8 in place of Breeze or Jeststream will be really handy. Less learning curve if you are familiar with a bootstrap react front end stack.

@apolopena apolopena added the enhancement New feature or request label Feb 3, 2021
@apolopena apolopena changed the title [FEAT]optional installs of react and vue [FEAT]optional installs of react and bootstrap Feb 3, 2021
apolopena added a commit that referenced this issue Feb 3, 2021
@apolopena apolopena changed the title [FEAT]optional installs of react and bootstrap [FEAT]optional installs of react, vue and bootstrap Feb 4, 2021
@apolopena apolopena added the passed-dev-qa Optional state. Use this when QAing other peoples fixes in another branch.ready to be merged to main label Feb 4, 2021
@apolopena apolopena self-assigned this Feb 4, 2021
apolopena added a commit that referenced this issue Feb 4, 2021
Feature #20: optional installs of react, vue and bootstrap
@apolopena apolopena added the Needs Official QA Dev QA is not always enough, this could use extra eyes on it. label Feb 4, 2021
@apolopena apolopena changed the title [FEAT]optional installs of react, vue and bootstrap Optional installs of react, vue and bootstrap Feb 4, 2021
@apolopena apolopena added the gitpod-config Related to gitpod configuration (bash scripts etc...) label Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gitpod-config Related to gitpod configuration (bash scripts etc...) Needs Official QA Dev QA is not always enough, this could use extra eyes on it. passed-dev-qa Optional state. Use this when QAing other peoples fixes in another branch.ready to be merged to main
Projects
None yet
Development

No branches or pull requests

1 participant