How to introduce vue and es6 for front-end and back-end unseparated projects

is responsible for maintaining the new company, that is, the kind of ancient legacy projects with many functions and very messy logic, and refactoring is basically not realistic, but if you want to introduce vue and do some componentized splitting logic, at least the maintainability of some code can be clearly improved
the basic framework is made up of c-sharp+jquery+easyui
vue can be introduced directly, but vue for easyui can only be installed with npm, and es6 can not be used directly for babel transcoding. Do you veteran drivers have any better treatment plans?

Jul.03,2022

splits the front-end project, which is maintained by vue . The back-end is responsible for forwarding the packaged js to the old project


.

es6 transcoding requires babel . But babel is also js. You can convert the code and then write it to script.

in fact, the new function can be placed in a separate directory, that is, more than one level of jump. It's not a problem.


the front end uses vue-cli3 to do the back-end cs as usual. Read the css and js in the packaged index.html and output them to the page

.

the front end uses ide/components-registration.html-sharp%E5%85%A8%E5%B1%80%E6%B3%A8%E5%86%8C" rel=" nofollow noreferrer "> global registration good ide/components-dynamic-async.html-sharp%E5%BC%82%E6%AD%A5%E7%BB%84%E4%BB%B6" rel= "nofollow noreferrer" > Asynchronous component can

Main.Master.cs

    public partial class Main : System.Web.UI.MasterPage
    {
        public string JsList = string.Empty;
        public string CssList = string.Empty;

        protected void Page_Load(object sender, EventArgs e)
        {
            var html = System.IO.File.ReadAllText(Server.MapPath("~/index.html"), Encoding.UTF8);
            CssList = GetValues(Regex.Matches(html, @"<link [^>]+>"));
            JsList = GetValues(Regex.Matches(html, @"<script .*?</script>"));
        }

        static string GetValues(MatchCollection mc)
        {
            var sb = new StringBuilder();
            foreach (Match m in mc)
            {
                sb.Append(m.Value);
            }
            return sb.ToString();
        }
    }
< hr >

Main.Master

<!DOCTYPE html>

<html>
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <asp:PlaceHolder ID="PlaceHolder1" runat="server">
        <%= CssList %>
    </asp:PlaceHolder>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <%= JsList %>
    <asp:ContentPlaceHolder ID="content" runat="server">
    </asp:ContentPlaceHolder>
</body>
</html>

use https://github.com/JeffreyWay...
although it is a package that works with php, but write a mix function and you can migrate to other languages

.
Menu