本文整理汇总了C#中ScriptBundle.Include方法的典型用法代码示例。如果您正苦于以下问题:C# ScriptBundle.Include方法的具体用法?C# ScriptBundle.Include怎么用?C# ScriptBundle.Include使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScriptBundle
的用法示例。
在下文中一共展示了ScriptBundle.Include方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisterBundles
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/js").Include(
"~/Scripts/jquery-1.10.2.min.js",
"~/Scripts/jquery.signalR-2.1.1.min.js"));
var tsBundle = new ScriptBundle("~/bundles/ts");
tsBundle.Include(
"~/Scripts/ts/Component.js",
"~/Scripts/ts/Animator.js",
"~/Scripts/ts/Hub.js",
"~/Scripts/ts/Models/Player.js",
"~/Scripts/ts/Models/DataModel.js",
"~/Scripts/ts/Application.js",
"~/Scripts/ts/Components/Connecting.js",
"~/Scripts/ts/Components/Hello.js",
"~/Scripts/ts/Components/PlayUI.js");
#if DEBUG
tsBundle.Include("~/Scripts/ts/Debug.js");
#endif
bundles.Add(tsBundle);
bundles.Add(new StyleBundle("~/Content/bundles/css").Include(
"~/Content/css/Site.css", new CssRewriteUrlTransform()));
// Set EnableOptimizations to false for debugging. For more information,
// visit http://go.microsoft.com/fwlink/?LinkId=301862
#if DEBUG
BundleTable.EnableOptimizations = false;
#else
BundleTable.EnableOptimizations = true;
#endif
}
示例2: IncludeSharedScripts
private static void IncludeSharedScripts(ScriptBundle jsBundle)
{
jsBundle.Include("~/Assets/Scripts/shared/bootbox.js");
jsBundle.Include("~/Assets/Scripts/shared/head.js");
jsBundle.Include("~/Assets/Scripts/shared/tagmanager.js");
jsBundle.Include("~/Assets/Scripts/shared/toastr.js");
}
示例3: RegisterBundles
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Clear();
bundles.ResetAll();
ScriptBundle loginBundle = new ScriptBundle("~/js/login");
loginBundle.Include("~/Content/js/lib/jquery-1.8.0.min.js");
loginBundle.Include("~/Views/Documentation/Login.js");
bundles.Add(loginBundle);
ScriptBundle sandboxBundle = new ScriptBundle("~/js/sandbox");
sandboxBundle.Include("~/Content/js/lib/jquery-1.8.0.min.js");
sandboxBundle.Include("~/Content/js/lib/jquery.slideto.min.js");
sandboxBundle.Include("~/Content/js/lib/jquery.wiggle.min.js");
sandboxBundle.Include("~/Content/js/lib/jquery.ba-bbq.min.js");
sandboxBundle.Include("~/Content/js/lib/handlebars-2.0.0.js");
sandboxBundle.Include("~/Content/js/lib/underscore-min.js");
sandboxBundle.Include("~/Content/js/lib/backbone-min.js");
sandboxBundle.Include("~/Content/js/swagger-ui.js");
sandboxBundle.Include("~/Content/js/lib/highlight.7.3.pack.js");
sandboxBundle.Include("~/Content/js/lib/marked.js");
sandboxBundle.Include("~/Content/js/lib/swagger-oauth.js");
sandboxBundle.Include("~/Views/Documentation/Sandbox.js");
bundles.Add(sandboxBundle);
bundles.Add(new StyleBundle("~/css/login").Include("~/Content/css/login.css"));
bundles.Add(new StyleBundle("~/css/sandbox").Include("~/Content/css/reset.css",
"~/content/css/typography.css",
"~/content/css/screen.css"));
}
示例4: AddAppBundles
private static void AddAppBundles(BundleCollection bundles)
{
var scriptBundle = new ScriptBundle(ScriptsBundleVirtualPath);
#if (DEBUG && LOCAL)
var adminAppDirFullPath = Path.Combine(HttpRuntime.AppDomainAppPath, AdminAppDir);
// Create the .NET bundle, then use that list to generate an actual bundle.js file
if (Directory.Exists(adminAppDirFullPath))
{
scriptBundle.Include(
// Order matters, so get the core app setup first
string.Format("~/{0}/app.core.module.js", AdminAppDir),
string.Format("~/{0}/app.module.js", AdminAppDir))
// then get any other top level js files
.IncludeDirectory(string.Format("~/{0}", AdminAppDir), "*.js", false)
// then get all nested module js files
.IncludeDirectory(string.Format("~/{0}", AdminAppDir), "*-module.js", true)
// finally, get all the other js files
.IncludeDirectory(string.Format("~/{0}", AdminAppDir), "*.js", true);
bundles.Add(scriptBundle);
// Generate a new bundle script. This should only be done on a local box as running from the build server causes issues.
GenerateBundleJS(scriptBundle, bundles);
}
#elif (DEBUG && !LOCAL)
scriptBundle.Include(string.Format("~/{0}/briandevlin.bundled.js", "scripts"));
bundles.Add(scriptBundle);
#elif !DEBUG
scriptBundle.Include(string.Format("~/{0}/briandevlin.bundled.js", "scripts"));
bundles.Add(scriptBundle);
#endif
}
示例5: Application_Start
protected void Application_Start(object sender, EventArgs args)
{
var scriptBundle = new ScriptBundle("~/Scripts/combined");
scriptBundle.Include("~/Scripts/libs/*.js");
scriptBundle.Include("~/Scripts/*.ts");
scriptBundle.Transforms.Add(new JsTransformer());
scriptBundle.Orderer = new ScriptDependencyOrderer();
BundleTable.Bundles.Add(scriptBundle);
}
示例6: PluginsBundle
private static void PluginsBundle(BundleCollection bundles)
{
var plugins = new ScriptBundle("~/bundles/plugins");
plugins.Include("~/Scripts/plugins/angular.min.js");
plugins.Include("~/Scripts/plugins/velocity.min.js");
plugins.Include("~/Scripts/plugins/moment-with-locales.min.js");
plugins.Include("~/Scripts/plugins/lumx.min.js");
bundles.Add(plugins);
}
示例7: RegisterBundles
// For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
public static void RegisterBundles(BundleCollection bundles)
{
StyleBundle estilos = new StyleBundle("~/bundles/estilos");
estilos.Include("~/Content/bootstrap/css/bootstrap.css");
estilos.Include("~/Content/Style.css");
bundles.Add(estilos);
ScriptBundle scripts = new ScriptBundle("~/bundles/scripts");
scripts.Include("~/Scripts/jquery-2.1.1.js");
scripts.Include("~/Scripts/jquery.validate.js");
scripts.Include("~/Scripts/jquery.validate.unobtrusive.js");
bundles.Add(scripts);
}
示例8: Config
public static void Config(BundleCollection bundles)
{
var scriptBundle = new ScriptBundle(Path);
scriptBundle.Include("~/Scripts/angular.js");
scriptBundle.Include("~/Scripts/angular-ui-router.js");
scriptBundle.Include("~/Scripts/angular-resource.js");
scriptBundle.Include("~/Scripts/angular-cookies.js");
scriptBundle.IncludeDirectory("~/Angular/Modules", "*.js", true);
scriptBundle.IncludeDirectory("~/Angular/Services", "*.js", true);
scriptBundle.IncludeDirectory("~/Angular/Controllers", "*.js", true);
bundles.Add(scriptBundle);
}
示例9: IncludeJQueryScripts
private static void IncludeJQueryScripts(ScriptBundle jsBundle)
{
jsBundle.Include("~/Assets/Scripts/jquery/additional-methods.js");
jsBundle.Include("~/Assets/Scripts/jquery/jquery-1.9.1.js");
jsBundle.Include("~/Assets/Scripts/jquery/jquery-ui-1.10.3.custom.js");
jsBundle.Include("~/Assets/Scripts/jquery/jquery.fieldSelection.js");
jsBundle.Include("~/Assets/Scripts/jquery/jquery.fileupload.js");
jsBundle.Include("~/Assets/Scripts/jquery/jquery.form-extensions.js");
jsBundle.Include("~/Assets/Scripts/jquery/jquery.iframe-transport.js");
jsBundle.Include("~/Assets/Scripts/jquery/jquery.timeago.js");
jsBundle.Include("~/Assets/Scripts/jquery/jquery.validate.js");
}
示例10: Register
public static void Register(IKernel kernel)
{
if (!CurrentRequestData.DatabaseIsInstalled)
return;
foreach (IStylesheetBundle bundle in kernel.GetAll<IStylesheetBundle>())
{
var styleBundle = new StyleBundle(bundle.Url);
foreach (string file in bundle.Files)
{
styleBundle.Include(file);
}
BundleTable.Bundles.Add(styleBundle);
}
foreach (IScriptBundle bundle in kernel.GetAll<IScriptBundle>())
{
var styleBundle = new ScriptBundle(bundle.Url);
foreach (string file in bundle.Files)
{
styleBundle.Include(file);
}
BundleTable.Bundles.Add(styleBundle);
}
BundleTable.EnableOptimizations = kernel.Get<BundlingSettings>().EnableOptimisations;
}
示例11: RegisterBundles
public static void RegisterBundles(BundleCollection bundles)
{
StyleBundle cssBundle = new StyleBundle("~/Content/IntelliDocsCSS");
cssBundle.Include(
"~/Content/bootstrap.css",
"~/Content/font-awesome.css",
"~/Content/jquery.auto-complete.css",
"~/Content/IntelliDocs.css"
);
bundles.Add(cssBundle);
ScriptBundle jsBundle = new ScriptBundle("~/Scripts/IntelliDocsJS");
jsBundle.Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery.form.js",
"~/Scripts/jquery.auto-complete.js",
"~/Scripts/bootstrap.js",
"~/Scripts/IntelliDocs/IntelliDocs.js"
);
bundles.Add(jsBundle);
ScriptBundle jqueryValBundle = new ScriptBundle("~/Scripts/jQueryVal");
jqueryValBundle.Include(
"~/Scripts/jquery.validate.js",
"~/Scripts/jquery.validate.unobtrusive.js"
);
bundles.Add(jqueryValBundle);
}
示例12: RegisterBundles
public static void RegisterBundles(BundleCollection bundles)
{
var frontpageAll = new ScriptBundle("~/bundles/js");
frontpageAll.Include("~/Scripts/lib/jquery-{version}.js")
.Include(
"~/Scripts/lib/jquery.ui.core.js",
"~/Scripts/lib/jquery.ui.widget.js",
"~/Scripts/lib/jquery.ui.position.js",
"~/Scripts/lib/jquery.ui.dialog.js",
"~/Scripts/lib/jquery.ui.mouse.js",
"~/Scripts/lib/jquery.ui.sortable.js",
"~/Scripts/handlebars.js")
.Include("~/Scripts/bootstrap.js")
.IncludeDirectory("~/Scripts/frontpage", "*.js");
var frontpage = new NontestBundle("~/bundles/frontpage", frontpageAll);
var frontpageTest = new TestBundle("~/bundles/frontpage-test", frontpageAll);
bundles.Add(frontpage);
bundles.Add(frontpageTest);
var southStreetTheme = new StyleBundle("~/Content/themes/south-street/all.css")
.IncludeDirectory("~/Content/themes/south-street/", "*.css")
.Include("~/Content/bootstrap.css");
bundles.Add(southStreetTheme);
}
示例13: RegisterBundles
public static void RegisterBundles(BundleCollection bundles)
{
var bundle = new ScriptBundle("~/Scripts/chartup-min");
bundle.Include("~/Scripts/charts/chart.js");
bundle.IncludeDirectory("~/Scripts/", "*.js", true);
bundles.Add(bundle);
}
示例14: RegisterBundles
public static void RegisterBundles(BundleCollection bundles)
{
{
bundles.UseCdn = true;
StyleBundle siteCSS = new StyleBundle("~/Content/siteCSS");
siteCSS.Include("~/Content/navbar_style.css",
"~/Content/site_style.css");
bundles.Add(siteCSS);
StyleBundle bootstrapCSS = new StyleBundle("~/Content/bootstrapCSS", "//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css");
bootstrapCSS.Include("~/Content/bootstrap.min.css");
bundles.Add(bootstrapCSS);
StyleBundle fontawesomeCSS = new StyleBundle("~/Content/fontawesomeCSS", "//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css");
fontawesomeCSS.Include("~/Content/font-awesome.css");
bundles.Add(fontawesomeCSS);
ScriptBundle siteJS = new ScriptBundle("~/Scripts/siteJS");
siteJS.Include("~/Scripts/jquery-2.1.4.min.js", "~/Scripts/bootstrap.min.js");
bundles.Add(siteJS);
BundleTable.EnableOptimizations = true;
}
}
示例15: RegisterBundles
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/Bundles/js").Include(
"~/scripts/jquery-{version}.js",
"~/scripts/bootstrap.js"));
var appBundle = new ScriptBundle("~/Bundles/app").Include(
"~/scripts/angular.js",
"~/scripts/angular-animate.js",
"~/scripts/angular-messages.js",
"~/scripts/angular-resource.js",
"~/scripts/angular-route.js",
"~/scripts/angular-sanitize.js",
"~/scripts/angular-ui-router.js",
"~/scripts/angular-ui/ui-bootstrap.js",
"~/scripts/angular-ui/ui-bootstrap-tpls.js",
"~/Scripts/html5shiv.js",
"~/Scripts/respond.js",
"~/scripts/ngToast.min.js",
"~/scripts/ngToast.min.js");
appBundle.Include(System.Configuration.ConfigurationManager.AppSettings["UseTestData"] == "true"
? "~/scripts/settings-test.js"
: "~/scripts/settings-prod.js");
appBundle.IncludeDirectory("~/app", "*.js", true);
bundles.Add(appBundle);
bundles.Add(new StyleBundle("~/Bundles/css").Include(
"~/content/bootstrap.css",
"~/content/bootstrap2-icons.css",
"~/content/ngToast.min.css",
"~/content/Site.css"));
}