New into squishIt, got some questions..

152 views
Skip to first unread message

David Larsson

unread,
Feb 11, 2013, 8:42:22 AM2/11/13
to squi...@googlegroups.com
I know that I need to change debug to false. But does .ForceRelease() make it possible to have debug set to true?
And if not, if I deploy to a server. Is it important that debug is set to false or will it not work
correctly?

The mainpoint of this plugin is to combined files. But im a bit scared to combined all my js files into one. Will they not crash into each other?

When developing it creates alot of files, is it okey to delete the old ones? Or is the best solution not to have debug set to false when developing?

Alex Ullrich

unread,
Feb 11, 2013, 9:20:34 AM2/11/13
to squi...@googlegroups.com
Yes, you need to have debugging turned off when you deploy to a server if you want files to be combined/minified.

You can use .ForceFelease when debugging if you are worried about problems coming from the combination process.

Deleting the old files is fine.  I usually output them to a directory like ~/js/combined/ that I then exclude from version control.

David Larsson

unread,
Feb 11, 2013, 9:49:22 AM2/11/13
to squi...@googlegroups.com
Thanks for some good answears.
I bet your meant .ForceRelease() :). So if I combined every js file in the project Im safe from the files to crash into each others? E.g I can have the same name of a function in two different files and then combined them without any problem. And there will not be any problem with global variables?
If that's Ok then I'll combined everything :)

Alex Ullrich

unread,
Feb 12, 2013, 10:19:44 AM2/12/13
to squi...@googlegroups.com
Whether or not you have any problem with global variables depends on the way your code is written, but you should be able to temporarily use ForceRelease to ensure that things work correctly in your debug environment, then go back to the normal debugging workflow.  I have seen problems with different combinations of jquery plugins in the past so its definitely possible that you'll have conflicts, but the only way to know for sure is to try it out.

David Larsson

unread,
Feb 18, 2013, 11:23:58 AM2/18/13
to squi...@googlegroups.com
Ok! I'll start with a combined on each page. That's a bit better then not have squishIt at all.

I saw on one page source code that it looked like this when I had debug set to false.

<head>
<link href="_css/MonthOverview.css" rel="stylesheet" type="text/css" />

<link href="_css/Calendar.css" rel="stylesheet" type="text/css" />
<link href="_css/smoothness/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="/WebSite/_css/combined/combinedMO_2AFBAC08B6D548616710C5B90CB5291B.css" />
<title>
</title>
</head>

Shouldn't my MonthOverview.css, Calendar.css, jquery-css be gone?

In my .aspx:
    <link href="_css/MonthOverview.css" rel="stylesheet" type="text/css" />
    <link href="_css/Calendar.css" rel="stylesheet" type="text/css" />
    <link href="_css/smoothness/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
    <%= Bundle.Css()
            .Add("~/_css/MonthOverview.css")
            .Add("~/_css/Calendar.css")
            .Add("_css/smoothness/jquery-ui-1.8.16.custom.css")
        .Render("~/_css/combined/combinedMO_#.css")
%>  

David Larsson

unread,
Feb 19, 2013, 5:34:56 AM2/19/13
to squi...@googlegroups.com
Found the "problem" :) The link tags should not be there.. Read a guide and he had them there, that's why I thought it.
Problem solved.
Reply all
Reply to author
Forward
0 new messages