S
S
SoSoPavlik2017-04-01 16:29:49
PHP
SoSoPavlik, 2017-04-01 16:29:49

How to correctly add javascript and css to the PSR-4 package?

For example, I'm creating a package, one of the classes of which has a method that should display a tag
. How do I add this code.js file to my project correctly?
In what folder should it be located, at what address should it be connected, so that when a developer uses my package and it gets into the vendor folder, it remains available?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2017-04-01
@pudovMaxim

PSR - PHP Standards Recommendations. It has little to do with js/css.
Your js and css from the package can be used if, for example, they are copied when the package is included. Or do it manually.
But it looks a little strange. Tell me what you want to do. Perhaps there is a more correct way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question