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

Update structure and use webpack #6

Closed
wants to merge 20 commits into from
Closed

Conversation

KABBOUCHI
Copy link

@KABBOUCHI KABBOUCHI commented Dec 11, 2017

  • Update structure (more friendly)
  • Add config file
  • Add webpack: client will use the precompiled version
  • Auth

user no longer need to add manually, install or add options

image

N.B: Not fully tested, please check if Controller need updates

Inspired by Laravel Horizon

- install dependencies

```bash
yarn add vue axios vue-ls vuemit vue-notif vue-clipboard2 vue-tippy vue-awesome
Copy link
Owner

@ctf0 ctf0 Dec 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reason for keeping the dependencies external is so you can use the same package anywhere else without the need to reinstall it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to install any dependencies, only the dev need them


- for styling we use ***bulma***

> ***Or Use another Framework***
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why ppl get confused with this, but u r not the first one to fall into this quote trap.

Copy link
Author

@KABBOUCHI KABBOUCHI Dec 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use other style:
1- .env (or config('lingo.theme')) => LINGO_THEME=theme1
2- publish lingo-views and add new file lingo-theme1.blade.php

image

config/lingo.php Outdated
'as' => 'lingo.',
'middleware' => 'web',
'theme' => env('LINGO_THEME','bulma'),
];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do u need this ?

Copy link
Author

@KABBOUCHI KABBOUCHI Dec 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add ability for user to change

  • the prefix (route)
  • the theme from config file or .env (previously was MIX_LINGO_FRAMEWORK)
  • custom middleware

"es6-promise": "^4.0.5",
"laravel-mix": "^1.4.2"
}
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again why do u need this ? other than restricting the packages versions

Copy link
Author

@KABBOUCHI KABBOUCHI Dec 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You always need to restrict package version, from v1 to v2 can break things

and again this for the developer

}


/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL3Nhc3MvcmVzb3VyY2VzL2Fzc2V0cy9zYXNzL2FwcC5zY3NzIiwid2VicGFjazovLy8uL2FwcC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztFQUVJO0VBQ0E7Q0NDSDs7QURFRDtFQUNJO0NDQ0g7O0FERUQ7RUFDSTtDQ0NIOztBREVEOztFQUVJO0VBQUE7Q0NDSDs7QURFRDs7RUFFSTtVQUFBO0VBQ0E7Q0NDSDs7QURFRDs7RUFFSTtFQUFBO0NDQ0g7O0FERUQ7O0VBRUk7VUFBQTtFQUNBO0NDQ0g7O0FERUQ7RUFDSTtFQUNBO0NDQ0g7O0FERUs7RUFDRjtFQUFBO0VBQ0E7RUFDQTtFQUNBO0NDQ0giLCJmaWxlIjoiL2Nzcy9hcHAuY3NzIiwic291cmNlc0NvbnRlbnQiOlsidGQsXG50aCB7XG4gICAgdGV4dC1hbGlnbjogY2VudGVyICFpbXBvcnRhbnQ7XG4gICAgdmVydGljYWwtYWxpZ246IG1pZGRsZSAhaW1wb3J0YW50O1xufVxuXG4ubS10LTUwIHtcbiAgICBtYXJnaW4tdG9wOiA1MHB4O1xufVxuXG4ubS10LTEwIHtcbiAgICBtYXJnaW4tdG9wOiAxMHB4O1xufVxuXG4uc2xpZGUtZmFkZS1lbnRlci1hY3RpdmUsXG4uc2xpZGUtZmFkZS1sZWF2ZS1hY3RpdmUge1xuICAgIHRyYW5zaXRpb246I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C40cztcbn1cblxuLnNsaWRlLWZhZGUtZW50ZXIsXG4uc2xpZGUtZmFkZS1sZWF2ZS10byB7XG4gIHRyYW5zZm9ybTogdHJhbnNsYXRlWCgxMHB4KTtcbiAgb3BhY2l0eTogMDtcbn1cblxuLmNvbXAtZmFkZS1lbnRlci1hY3RpdmUsXG4uY29tcC1mYWRlLWxlYXZlLWFjdGl2ZSB7XG4gIHRyYW5zaXRpb246IGFsbCAwLjRzO1xufVxuXG4uY29tcC1mYWRlLWVudGVyLFxuLmNvbXAtZmFkZS1sZWF2ZS10byB7XG4gIHRyYW5zZm9ybTogdHJhbnNsYXRlWCgtMzBweCk7XG4gIG9wYWNpdHk6IDA7XG59XG5cbi5uZXN0ZWRLZXkge1xuICBjb2xvcjogd2hpdGU7XG4gIGJhY2tncm91bmQtY29sb3I6ICMzNjM2MzY7XG59XG5cbnRoZWFkIHRoIHtcbiAgcG9zaXRpb246IHN0aWNreTtcbiAgei1pbmRleDogMTtcbiAgdG9wOiAzMHB4O1xuICBiYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTtcbn1cblxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vYXBwLnNjc3MiXSwic291cmNlUm9vdCI6IiJ9*/
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about the bulma override styles ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default will be bulma.css, you can support other framework like bootstrap

when user need to add custom style he can create new theme and change the file

image

You will only be able to access lingo in the local environment.

The auth method accepts a callback which should return true or false, indicating whether the user should have access to the Lingo section

Lingo::auth(function ($request) {
    // return true / false;
});
@KABBOUCHI
Copy link
Author

I added some new updates like Lingo::Auth

@ctf0
Copy link
Owner

ctf0 commented Dec 14, 2017

first thanx so much for all ur help

  • the config is not really needed, because for the routes in its current form, you are free to do whatever you want with it, you can put it under any group of middlewares, prefixes, etc..

config should be used only when its needed, specially as atm laravel config folder is a big mess.

  • for the webpack, could you tell how will i use it in a fresh laravel install ?

  • for changing the folder structure, i prefer to keep all the package files under the same level src, so plz undo that.

  • all my packages are made toward devs, so maintaining a compiled css, js files is simply a big headache for me.

  • for the controller, am not sure what exactly have you changed other than using the config values.

  • am not a big fan of the horizon auth approach, so this also will be declined.

@KABBOUCHI KABBOUCHI closed this Dec 14, 2017
@ctf0
Copy link
Owner

ctf0 commented Dec 14, 2017

@KABBOUCHI why closed ?

@KABBOUCHI
Copy link
Author

KABBOUCHI commented Dec 14, 2017

you declined all my updates, why you need it :)

edit:

all my updates does is for the end user benefits, if you don't want to maintain your product, it's okay no need to merge it

@ctf0
Copy link
Owner

ctf0 commented Dec 14, 2017

how about this

for the webpack, could you tell how will i use it in a fresh laravel install ?

@KABBOUCHI
Copy link
Author

Not sure what do you want, I added webpack to precompile css/js for dev purpose

it's already there in a fresh laravel installer

@ctf0
Copy link
Owner

ctf0 commented Dec 14, 2017

okay, thanx again

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.

2 participants