Beispiel #1
0
        public void TestIncludeInvoker()
        {
            var inclusionContent = "World";
            var mainContent      = "Hello {% include inclusion.html %}!";

            File.WriteAllText(testPath + @"\index.html", mainContent);
            File.WriteAllText(testSettings.IncludePath + @"\inclusion.html", inclusionContent);

            buildService.Execute();

            var amountOfBuiltDocuments = Directory.EnumerateFiles(testSettings.DestinationPath, "*", SearchOption.AllDirectories).ToList().Count;
            var content = File.ReadAllText(testSettings.DestinationPath + @"\index.html");

            Assert.IsTrue(amountOfBuiltDocuments == 1 && content == "Hello World!");
        }
Beispiel #2
0
        //https://github.com/dotnet/command-line-api
        //dotnet-KaneBlake LocaleGenerate
        static async Task <int> Main(string[] args)
        {
            if (args.Length == 0)
            {
                return(1);
            }
            var task = args[0];

            if (task.Equals("LocaleGenerate"))
            {
                var projectPath = string.Empty;
                if (args.Length > 1)
                {
                    projectPath = args[1];
                }
                var service = new BuildService();
                await service.Execute(projectPath);
            }

            return(0);
        }