S
S
sasha2014-08-06 16:59:29
Laravel
sasha, 2014-08-06 16:59:29

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

5 answer(s)
I
Igor, 2016-05-25
@Kraky

Here's a screencast from Jeffrey Way about multiple file uploads.

E
Evgeny Perin, 2016-05-23
@seoperin

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...

A
Andrzej Wielski, 2016-05-23
@wielski

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.

K
Kirill_Dan, 2017-02-14
@Kirill_Dan

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

L
Lynn "Coffee Man", 2014-08-07
@madmages

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 question

Ask a Question

731 491 924 answers to any question