Answer the question
In order to leave comments, you need to log in
How to get file path pattern from grunt?
there is a path
/ha/asdf/adsf/*/main/library/someShit.js.
instead of an asterisk, there are different folder names, but inside all these folders there is a continued path.
how to make this js file in Grunt so that after manipulating it, it lays down on the directory below, that is, in main.
i need something like
src: "/ha/asdf/adsf/*/main/library/someShit.js.",
dest: "/ha/asdf/adsf/<%= pathPattern %>/main/someShit.js."
Answer the question
In order to leave comments, you need to log in
If the product has one picture, then just add a field with a link to the picture in the database. If there can be multiple images, then a new image model and one2many link to the product. Well, or in the product database, make a field for several pictures and store it in json. You can turn around in different ways...
And what's the problem?
If the project is in production -
1) Create a new migration with adding a field to the database
2) Prescribe new fields and methods for obtaining images in the model
3) Display in the view in the desired format
Well, by analogy.
Just a field for storing images and done everything. And for flexible work with images, you can use the UploadImage package. Here is an article in Russian about it: Flexible image loading in Laravel
For complex cases, grunt has an option rename
.
The code will be something like this:
src: "/ha/asdf/adsf/*/main/library/someShit.js",
dest: "/ha/asdf/adsf/",
rename: function (dest, src) {
// calculate new_dest;
return new_dest;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question