Пример #1
0
 public static void AddDefaultIgnorePatterns(IgnoreList ignoreList)
 {
     if (ignoreList == null)
         throw new ArgumentNullException("ignoreList");
     ignoreList.Ignore("*.intellisense.js");
     ignoreList.Ignore("*-vsdoc.js");
 }
Пример #2
0
 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);
        }
Пример #17
0
        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");
     }
 }
Пример #20
0
        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);
        }
Пример #23
0
        public void IgnoreExactWhenUnoptimizedDoesNotAffectOtherModesTest()
        {
            IgnoreList    list    = new IgnoreList();
            BundleContext context = new BundleContext();

            context.EnableOptimizations = true;
            list.Ignore("*", OptimizationMode.WhenDisabled);
            Assert.IsFalse(list.ShouldIgnore(context, "whatever"));
        }
Пример #24
0
        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"));
        }
Пример #25
0
        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"));
        }
Пример #26
0
        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"));
        }
Пример #27
0
        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"));
        }
Пример #28
0
        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"));
        }
Пример #29
0
        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."));
        }
Пример #30
0
        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);
 }