예제 #1
0
        private static void CreatePHPIndexPage(IEntryPoint e, string file_name, Action entryfunction)
        {
            var a = new StringBuilder();

            a.AppendLine("<?");

            foreach (var u in SharedHelper.LocalModulesOf(Assembly.GetExecutingAssembly(), ScriptType.PHP))
            {
                a.AppendLine("require_once '" + u + ".php';");
            }

            a.AppendLine(entryfunction.Method.Name + "();");
            a.AppendLine("?>");


            e[file_name] = a.ToString();
        }
예제 #2
0
        static void Main(string[] args)
        {
            if (args.FirstOrDefault() == "appjet")
            {
                Console.WriteLine("creating install script...");

                Environment.CurrentDirectory = Path.Combine(Environment.CurrentDirectory, "web");

                using (var w = new StreamWriter(File.OpenWrite("AppJet.js")))
                {
                    w.BaseStream.SetLength(0);

                    w.WriteLine("/* appjet:version 0.1 */ ");

                    foreach (var k in SharedHelper.LocalModulesOf(typeof(Program).Assembly, ScriptType.JavaScript))
                    {
                        w.WriteLine(File.ReadAllText(k + ".js"));
                    }
                }
            }
        }
예제 #3
0
        static void Main(string[] args)
        {
            if (args.FirstOrDefault() == "appjet")
            {
                Console.WriteLine("creating install script...");

                Environment.CurrentDirectory = Path.Combine(Environment.CurrentDirectory, "web");

                // 100k is max
                // http://forum.appjet.com/search.php?search_id=1852971065
                using (var w = new StreamWriter(File.OpenWrite("AppJet.js")))
                {
                    w.BaseStream.SetLength(0);


                    w.WriteLine("/* appjet:version 0.1 */ ");

                    foreach (var k in SharedHelper.LocalModulesOf(typeof(Program).Assembly, ScriptType.JavaScript))
                    {
                        foreach (var x in File.ReadAllLines(k + ".js"))
                        {
                            var t = x.Trim();

                            var comment = t.IndexOf("//");

                            if (comment >= 0)
                            {
                                t = t.Substring(0, comment).Trim();
                            }

                            if (t.Length > 0)
                            {
                                w.Write(t);
                            }
                        }
                    }
                }
            }
        }