Пример #1
0
        public override void Configure(BundleCollectionConfigurer bundles)
        {
            var themeProvider =
                bundles.AppServices.GetService <IThemeProvider>() ??
                new ThemeProvider(bundles.AppServices.GetRequiredService <IWebHostEnvironment>());

            var themes = themeProvider.GetThemes();

            bundles.AddJs("/js/global.js")
            .Include("/js/*.js");

            bundles.AddJs("/js/dashboard.js")
            .Include("/js/dashboard/*.js");

            for (int i = 0, n = themes.Count; i < n; i++)
            {
                var sourcePath = themeProvider.GetThemePath(ThemeProvider.ThemesBasePath, themes[i]);
                var destPath   = themeProvider.GetThemePath("/css", themes[i]);

                bundles.AddSass(destPath + "/global.css")
                .Include(sourcePath + "/dashboard.scss");
            }
        }
Пример #2
0
 public override void Configure(BundleCollectionConfigurer bundles)
 {
     using (var fileProvider = new PhysicalFileProvider(Path.GetDirectoryName(ConfigFilePath)))
         bundles.LoadFromConfigFile(Path.GetFileName(ConfigFilePath), fileProvider);
 }
Пример #3
0
 public abstract void Configure(BundleCollectionConfigurer bundles);