Exemple #1
0
		protected void writeScriptPath(FileScriptResource script, AppScripts appScripts, WriteDelegate write)
		{
			string path = Debug ? script.DebugPath : script.MinPath;

			// Don't append scripts folder if path looks like:
			// http://... https://... //www.blah... /folder/blah...
			if (!(path.StartsWith("http") || path.StartsWith("/")))
				write(appScripts.ScriptsFolder);

			write(path);
		}
Exemple #2
0
		/// <summary>
		/// Include a script in the outgoing View by path, instead of pre-defining
		/// it in Global.asax.cs and referencing it by name.
		/// 
		/// Useful for page-only scripts that you don't want to take the time to
		/// declare more broadly for the app.
		/// </summary>
		public void Include(string name, string debugPath, string minPath, string dependencies)
		{
			FileScriptResource script = new FileScriptResource(name, debugPath, minPath, splitCommaDelimitedString(dependencies));
			PageScripts.Add(script);
		}