This is a migrated thread and some comments may be shown as answers.

Custom Downloader for internal build .js files

2 Answers 184 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gary Davis
Top achievements
Rank 2
Gary Davis asked on 24 Apr 2013, 06:49 PM
I built a custom download using your tool for the last release. I now need to use the current internal build/hotfix but the custom download tool does not support internals, apparently.

How can I combine the .js files I need into one kendo.custom.min.js file? Is it simply a matter of iterating thru each file and concatenating the text into the new file? Is there an order that must be observed?

I tried this LinqPad C# script but the resulting .js file did not appear to work.
// Iterate thru .js files in KendoCustom to create kendo.custom.min.js
 
void Main()
{
        var files = Directory.EnumerateFiles(@"C:\Users\me\Desktop\KendoCustom\", "*.js");
        var outputFile = @"C:\Users\me\Desktop\KendoCustom\kendo.custom.min.js";
        if (File.Exists(outputFile)) File.Delete(outputFile);
         
        foreach (var fileName in files)
        {
                var contents = File.ReadAllText(fileName);
                contents = "/* " + fileName + " */ " + contents + "\n\n";
                File.AppendAllText(outputFile, contents);              
        }
}
Thanks,
Gary Davis

2 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 25 Apr 2013, 02:11 PM
Hi,

The order of the files must be the same as the one listed in the download builder (CDN scripts). Other than that, a simple concatenation should be enough.

Including the internal builds in the download builder would be ideal. I'll forward this suggestion, but the implementation can take a while.

All the best,
Tsvetomir Tsonev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Gary Davis
Top achievements
Rank 2
answered on 25 Apr 2013, 03:58 PM
Thanks. Combining the files in the correct order did solve the problems (javascript errors on the pages).

I agree that adding internal builds to the download builder tool is a good idea.

Gary Davis
Tags
General Discussions
Asked by
Gary Davis
Top achievements
Rank 2
Answers by
T. Tsonev
Telerik team
Gary Davis
Top achievements
Rank 2
Share this question
or