Added skeleton Assets.json to codegen theme template.

This commit is contained in:
Daniel Stolt 2015-08-16 17:50:47 +01:00
parent a04195ee0e
commit 4b44827f2a

View File

@ -21,7 +21,7 @@ namespace Orchard.CodeGeneration.Commands {
private const string SolutionDirectoryThemes = "74492CBC-7201-417E-BC29-28B4C25A58B0";
private static readonly string[] _themeDirectories = new[] {
"", "Content", "Styles", "Scripts", "Views"
"", "Assets", "Content", "Styles", "Scripts", "Views"
};
private static readonly string[] _moduleDirectories = new[] {
"", "Properties", "Assets", "Controllers", "Views", "Models", "Scripts", "Styles"
@ -360,6 +360,15 @@ namespace Orchard.CodeGeneration.Commands {
}
}
File.WriteAllText(themePath + "Assets.json", File.ReadAllText(_codeGenTemplatePath + "ModuleAssetsJson.txt"));
createdFiles.Add(themePath + "Assets.json");
File.WriteAllText(themePath + "Assets\\Styles.less", File.ReadAllText(_codeGenTemplatePath + "ModuleStylesLess.txt"));
createdFiles.Add(themePath + "Assets\\Styles.less");
File.WriteAllText(themePath + "Styles\\Styles.css", File.ReadAllText(_codeGenTemplatePath + "ModuleStylesCss.txt"));
createdFiles.Add(themePath + "Styles\\Styles.css");
File.WriteAllText(themePath + "Styles\\Styles.min.css", File.ReadAllText(_codeGenTemplatePath + "ModuleStylesMinCss.txt"));
createdFiles.Add(themePath + "Styles\\Styles.min.css");
File.WriteAllText(themePath + "Web.config", File.ReadAllText(_codeGenTemplatePath + "ModuleRootWebConfig.txt"));
createdFiles.Add(themePath + "Web.config");
File.WriteAllText(themePath + "Scripts\\Web.config", File.ReadAllText(_codeGenTemplatePath + "StaticFilesWebConfig.txt"));