Beispiel #1
0
        private void ConsolidateAll(AssmanConfiguration configSection)
        {
            var context  = configSection.BuildContext(Mode, usePreCompilationReportIfPresent: false);
            var compiler = context.GetCompiler();
            var report   = compiler.CompileAll(WriteCompiledResource);

            report.Version = this.Version ?? DateTime.Now.ToString("yyMMddHHmm");
            configSection.SavePreConsolidationReport(report);
        }
 public void Init()
 {
     _instance = new AssmanConfiguration();
     _instance.Scripts.Consolidate = ResourceModeCondition.Always;
     _instance.Scripts.Groups.Add(new ScriptGroupElement());
     _instance.Scripts.Groups[0].ConsolidatedUrl = consolidatedScript;
     _instance.Scripts.Groups[0].Exclude.AddPattern(excludedScript);
     _instance.LastModified(DateTime.MinValue);
 }
Beispiel #3
0
        /// <summary>
        /// Executes the task.
        /// </summary>
        /// <returns></returns>
        public void Execute()
        {
            LogMessage("Begin consolidating resources...");
            using (new AssemblyResolver(ResolveAssemblyPathToWebsiteBinDir))
            {
                AssmanConfiguration configSection = GetConfigSection(WebsiteRootDirectory);
                ConsolidateAll(configSection);
            }

            LogMessage("End consolidating resources.");
        }