示例#1
0
 public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
 {
     if (ignoreList == null)
         throw new ArgumentNullException("ignoreList");
     ignoreList.Ignore("*.intellisense.js");
     ignoreList.Ignore("*-vsdoc.js");
 }
 public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
 {
     if (ignoreList == null)
         throw new ArgumentNullException("ignoreList");
     ignoreList.Ignore("*.intellisense.js");
     ignoreList.Ignore("*-vsdoc.js");
     ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
 }
示例#3
0
        public static void ConfigureIgnoreList(IgnoreList ignoreList)
        {
            ignoreList.Clear();

            ignoreList.Ignore("*.intellisense.js");
            ignoreList.Ignore("*-vsdoc.js");
            ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
        }
示例#4
0
        private static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
        {
            if (ignoreList == null)
                return;

            ignoreList.Ignore("*.intellisense.js");
            ignoreList.Ignore("*-vsdoc.js");
            ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
        }
示例#5
0
 public static void ResetIgnorePatterns(IgnoreList ignoreList)
 {
     ignoreList.Clear();
     ignoreList.Ignore("*.intellisense.js");
     ignoreList.Ignore("*-vsdoc.js");
     ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
     //ignoreList.Ignore("*.min.js", OptimizationMode.WhenDisabled);
     ignoreList.Ignore("*.min.css", OptimizationMode.WhenDisabled);
 }
示例#6
0
 public static void ResetIgnorePatterns(IgnoreList ignoreList)
 {
     ignoreList.Clear();
     ignoreList.Ignore("*.intellisense.js");
     ignoreList.Ignore("*-vsdoc.js");
     ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
     //ignoreList.Ignore("*.min.js", OptimizationMode.WhenDisabled);
     ignoreList.Ignore("*.min.css", OptimizationMode.WhenDisabled);
 }
示例#7
0
 public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
 {
     if (ignoreList == null)
     {
         throw new ArgumentNullException("ignoreList");
     }
     ignoreList.Ignore("*.intellisense.js");
     ignoreList.Ignore("*-vsdoc.js");
 }
示例#8
0
 public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
 {
     if (ignoreList == null)
     {
         throw new System.ArgumentNullException("ignoreList");
     }
     ignoreList.Ignore("*.min.js", OptimizationMode.WhenDisabled);
     ignoreList.Ignore("*.min.css", OptimizationMode.WhenDisabled);
     ignoreList.Ignore("*.css", OptimizationMode.WhenDisabled);
 }
示例#9
0
        private static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
        {
            if (ignoreList == null)
            {
                throw new ArgumentNullException("BundleConfig ignore list.");
            }

            ignoreList.Ignore("*.intellisense.js");
            ignoreList.Ignore("*-vsdoc.js");
        }
 public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
 {
     if (ignoreList == null)
     {
         throw new ArgumentNullException("ignoreList");
     }
     ignoreList.Ignore("*.intellisense.js");
     ignoreList.Ignore("*-vsdoc.js");
     ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
 }
示例#11
0
        private static void AddDefaultIgnoresToBundles(IgnoreList ignoreList)
        {
            if (ignoreList == null)
            {
                throw new ArgumentNullException(nameof(ignoreList));
            }

            ignoreList.Ignore("*.min.js", OptimizationMode.Always);
            ignoreList.Ignore("*.min.css", OptimizationMode.Always);
        }
示例#12
0
        private static void SetupIgnorePatterns(IgnoreList ignoreList)
        {
            if (ignoreList == null)
                throw new ArgumentNullException("ignoreList");

            ignoreList.Clear();
            ignoreList.Ignore("*.intellisense.js");
            ignoreList.Ignore("*-vsdoc.js");
            ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
        }
示例#13
0
        private static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
        {
            if (ignoreList == null)
            {
                throw new ArgumentNullException("BundleConfig ignore list.");
            }

            ignoreList.Ignore("*.intellisense.js");
            ignoreList.Ignore("*-vsdoc.js");
            //ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
        }
示例#14
0
 public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
 {
     if (ignoreList != null)
     {
         ignoreList.Ignore("*.intellisense.js");
         ignoreList.Ignore("*-vsdoc.js");
         ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
         ignoreList.Ignore("*.min.js", OptimizationMode.WhenEnabled);
         ignoreList.Ignore("*.min.css", OptimizationMode.WhenDisabled);
     }
 }
        private static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
        {
            if (ignoreList == null)
            {
                return;
            }

            ignoreList.Ignore("*.intellisense.js");
            ignoreList.Ignore("*-vsdoc.js");
            ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
        }
示例#16
0
        private static void SetupIgnorePatterns(IgnoreList ignoreList)
        {
            if (ignoreList == null)
            {
                throw new ArgumentNullException("ignoreList");
            }

            ignoreList.Clear();
            ignoreList.Ignore("*.intellisense.js");
            ignoreList.Ignore("*-vsdoc.js");
            ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
        }
        public void OptimizationNotEnabledIgnoreModesTest()
        {
            IgnoreList    list    = new IgnoreList();
            BundleContext context = new BundleContext();

            context.EnableOptimizations = false;
            list.Ignore("unoptimized", OptimizationMode.WhenDisabled);
            list.Ignore("optimized", OptimizationMode.WhenEnabled);
            list.Ignore("always", OptimizationMode.Always);

            Assert.IsTrue(list.ShouldIgnore(context, "unoptimized"));
            Assert.IsFalse(list.ShouldIgnore(context, "optimized"));
            Assert.IsTrue(list.ShouldIgnore(context, "always"));
        }
示例#18
0
        public static void ConfigureIgnoreList(IgnoreList ignoreList)
        {
            if (ignoreList == null)
            {
                throw new ArgumentNullException("ignoreList");
            }

            ignoreList.Clear(); // Clear the list, then add the new patterns.

            ignoreList.Ignore("*.intellisense.js");
            ignoreList.Ignore("*-vsdoc.js");
            ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
            // ignoreList.Ignore("*.min.js", OptimizationMode.WhenDisabled);
            ignoreList.Ignore("*.min.css", OptimizationMode.WhenDisabled);
        }
示例#19
0
 public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
 {
     if (ignoreList != null)
     {
         ignoreList.Ignore("*.intellisense.js");
         ignoreList.Ignore("*-vsdoc.js");
         ignoreList.Ignore("*.min.js");
         ignoreList.Ignore("*.min.css");
         ignoreList.Ignore("*.css.map");
     }
     else
     {
         throw new ArgumentNullException("ignoreList");
     }
 }
        public void SomeOfEachAllTogetherTest()
        {
            BundleContext context = new BundleContext();
            IgnoreList    list    = new IgnoreList();

            list.Ignore("*.ignore");
            list.Ignore("_*");
            list.Ignore("ignore.me");

            Assert.IsFalse(list.ShouldIgnore(context, "hao.kung"));
            Assert.IsTrue(list.ShouldIgnore(context, ".ignore"));
            Assert.IsTrue(list.ShouldIgnore(context, "blah.IGNore"));
            Assert.IsTrue(list.ShouldIgnore(context, "_whatever"));
            Assert.IsTrue(list.ShouldIgnore(context, "IGNORE.me"));
        }
示例#21
0
 public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
 {
     if (ignoreList != null)
     {
         ignoreList.Clear();
         ignoreList.Ignore("*.intellisense.js");
         ignoreList.Ignore("*-vsdoc.js");
         ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
         //ignoreList.Ignore("*.min.js", OptimizationMode.WhenDisabled);
         //signoreList.Ignore("*.min.css", OptimizationMode.WhenDisabled);
         return;
     }
     else
     {
         throw new ArgumentNullException("ignoreList");
     }
 }
示例#22
0
        public static void AddIgnorePaterns(IgnoreList ignoreList)
        {
            if (ignoreList == null)
            {
                throw new ArgumentNullException("ignoreList");
            }

            ignoreList.Ignore("*.min.js", OptimizationMode.WhenEnabled);
        }
        public void IgnoreExactWhenUnoptimizedDoesNotAffectOtherModesTest()
        {
            IgnoreList    list    = new IgnoreList();
            BundleContext context = new BundleContext();

            context.EnableOptimizations = true;
            list.Ignore("*", OptimizationMode.WhenDisabled);
            Assert.IsFalse(list.ShouldIgnore(context, "whatever"));
        }
        public void IgnoreAllTest()
        {
            IgnoreList list = new IgnoreList();

            list.Ignore("*");
            BundleContext context = new BundleContext();

            Assert.IsTrue(list.ShouldIgnore(context, "whatever"));
            Assert.IsTrue(list.ShouldIgnore(context, "adlfkjadf"));
        }
        public void ClearTest()
        {
            BundleContext context = new BundleContext();
            IgnoreList    list    = new IgnoreList();

            list.Ignore("*");
            list.Ignore("*.ignore");
            list.Ignore("_*");
            list.Ignore("ignore.me");

            Assert.IsTrue(list.ShouldIgnore(context, ".ignore"));
            Assert.IsTrue(list.ShouldIgnore(context, "blah.IGNore"));
            Assert.IsTrue(list.ShouldIgnore(context, "_whatever"));
            Assert.IsTrue(list.ShouldIgnore(context, "IGNORE.me"));

            list.Clear();
            Assert.IsFalse(list.ShouldIgnore(context, ".ignore"));
            Assert.IsFalse(list.ShouldIgnore(context, "blah.IGNore"));
            Assert.IsFalse(list.ShouldIgnore(context, "_whatever"));
            Assert.IsFalse(list.ShouldIgnore(context, "IGNORE.me"));
        }
        public void IgnorePrefixWithNoDotTest()
        {
            BundleContext context = new BundleContext();
            IgnoreList    list    = new IgnoreList();

            list.Ignore("*ignore");

            Assert.IsFalse(list.ShouldIgnore(context, "ignore.foo"));
            Assert.IsTrue(list.ShouldIgnore(context, "whateverignore"));
            Assert.IsTrue(list.ShouldIgnore(context, "whatever.ignore"));
            Assert.IsTrue(list.ShouldIgnore(context, "whatever.ignore.ignore.ignore"));
            Assert.IsTrue(list.ShouldIgnore(context, "whatever.no.way.ignore"));
        }
        public void IgnoreExactWithDifferentCasingTest()
        {
            BundleContext context = new BundleContext();
            IgnoreList    list    = new IgnoreList();

            list.Ignore("IGnore.foo");

            Assert.IsFalse(list.ShouldIgnore(context, "whatever"));
            Assert.IsFalse(list.ShouldIgnore(context, "adlfkjadf"));
            Assert.IsFalse(list.ShouldIgnore(context, "FooIGnore.Bar"));
            Assert.IsTrue(list.ShouldIgnore(context, "IGNORE.FOO"));
            Assert.IsTrue(list.ShouldIgnore(context, "ignore.FOO"));
            Assert.IsTrue(list.ShouldIgnore(context, "ignore.foo"));
        }
        public void IgnoreUsingRegexPatternTest()
        {
            IgnoreList list = new IgnoreList();

            list.Ignore("jquery-{version}.js");
            BundleContext context = new BundleContext();

            Assert.IsTrue(list.ShouldIgnore(context, "jquery-1.0.js"));
            Assert.IsTrue(list.ShouldIgnore(context, "jquery-10.0.2.js"));
            Assert.IsTrue(list.ShouldIgnore(context, "JQueRY-10.0.2.js"));
            Assert.IsFalse(list.ShouldIgnore(context, "jquery-1.js"));
            Assert.IsFalse(list.ShouldIgnore(context, "jquery-1.0"));
            Assert.IsFalse(list.ShouldIgnore(context, "jquery.js"));
        }
        public void IgnoreSuffixWithDifferentCasingTest()
        {
            BundleContext context = new BundleContext();
            IgnoreList    list    = new IgnoreList();

            list.Ignore("IGnore.*");

            Assert.IsFalse(list.ShouldIgnore(context, "signore"));
            Assert.IsFalse(list.ShouldIgnore(context, "adlfkjadf"));
            Assert.IsTrue(list.ShouldIgnore(context, "IGNORE.FOO"));
            Assert.IsTrue(list.ShouldIgnore(context, "ignore.FOO"));
            Assert.IsTrue(list.ShouldIgnore(context, "ignore.foo"));
            Assert.IsTrue(list.ShouldIgnore(context, "ignore.foo.bar"));
            Assert.IsTrue(list.ShouldIgnore(context, "iGNore."));
        }
        public void IgnorePrefixWithDifferentCasingTest()
        {
            BundleContext context = new BundleContext();
            IgnoreList    list    = new IgnoreList();

            list.Ignore("*.ignore");

            Assert.IsFalse(list.ShouldIgnore(context, ".aignore"));
            Assert.IsFalse(list.ShouldIgnore(context, "aignoredlfkjadf"));
            Assert.IsFalse(list.ShouldIgnore(context, "ignore"));
            Assert.IsTrue(list.ShouldIgnore(context, "foo.vsfoo.ignore"));
            Assert.IsTrue(list.ShouldIgnore(context, "foo.IGNore"));
            Assert.IsTrue(list.ShouldIgnore(context, ".ignore"));
            Assert.IsTrue(list.ShouldIgnore(context, "blah.ignore"));
        }
示例#31
0
 public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
 {
     ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
     ignoreList.Ignore("*.debug.css", OptimizationMode.WhenDisabled);
 }
示例#32
0
 public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
 {
     ignoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
     ignoreList.Ignore("*.debug.css", OptimizationMode.WhenDisabled);
 }