wiledal / gulp-include

Enables functionality similar to that of snockets / sprockets or other file insertion compilation tools.
157 stars 68 forks source link

codekit prepend and append #30

Open minimit opened 10 years ago

minimit commented 10 years ago

Would be great if this could work with the codekit includes for compatibility! (https://incident57.com/codekit/help.html#javascript)

But it works a bit different, it can only append or prepend to the file and only once

// @codekit-prepend "someFile.js";
// @codekit-prepend "someFile.js", "../someOtherFile.js", "../scripts/thirdFile.js";

The're also used on many others software like codekit that support the same syntax (http://alphapixels.com/prepros/docs/js-concat-minify.html)

andrewcroce commented 9 years ago

+1 for this

wiledal commented 9 years ago

I think this slightly out of the scope of this plugin, which is to include at specified locations. There are separate gulp plugins for prepending and appending.

Might be adding //=prepend path/to/file.txt, and //=append path/to/file.txt to the nice-to-have list.

andrewcroce commented 9 years ago

I can see what you mean. I think the suggestion was more for codekit syntax compatibility, and less about the inclusion location. I have recently gotten in the habit of writing both // @codekit-prepend and //= require lines, duplicating my includes for each one. One just ignores the other, so it seems to be working fine.

robsonsobral commented 7 years ago

I agree. To have the syntax used by Codekit and Prepros whould be amazing for work on teams.

KenEucker commented 5 years ago

This is a nice to have that I think we can test for.

I realize this is an old issue for some, but if there is anyone who still wants this feature let us know. As mentioned in the proposed pull request (https://github.com/wiledal/gulp-include/pull/31), we need tests created to handle the use cases that come with this feature and then we can move forward.