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

Best practices for personal javascript code #30

Closed
ohtormen opened this issue Jan 19, 2019 · 2 comments
Closed

Best practices for personal javascript code #30

ohtormen opened this issue Jan 19, 2019 · 2 comments

Comments

@ohtormen
Copy link
Contributor

It's a question, and I do not know if this place is best to ask. So what do you think about small pieces of javascript code (such as forms ajax calls, some frontend behavior, some component-specific behavior, etc.), should be placed inside a folder like /resources/js/utils/some-folder? Where you put your javascript codes of this type, in time, we're not talking about VueComponents, hum?

@kossa
Copy link
Owner

kossa commented Jan 20, 2019

Alright for my case I'm creating new folder for jquery functions, and I compile them

Take a look on : https://github.com/kossa/laradminator/blob/master/resources/js/select2/index.js

@ohtormen
Copy link
Contributor Author

Tks @kossa,
I found this answer https://stackoverflow.com/a/45365149/2071578 which explains exactly the concept, thank you!

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

No branches or pull requests

2 participants