mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
26 lines
827 B
C#
26 lines
827 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Text.RegularExpressions;
|
|
|
|
namespace BilibiliEvolved.Build
|
|
{
|
|
partial class ProjectBuilder
|
|
{
|
|
public ProjectBuilder BuildClient()
|
|
{
|
|
var source = File.ReadAllText("client/bilibili-evolved.js");
|
|
source = RegexReplacer.Replace(source, @"import (.*) from [""'](.*)[""'];", match =>
|
|
{
|
|
var module = File.ReadAllText("client/" + match.Groups[2].Value.Replace("./", "") + ".js").Replace("export ", "");
|
|
return module;
|
|
});
|
|
File.WriteAllText(SourcePath, source);
|
|
Source = File.ReadAllText(SourcePath);
|
|
WriteSuccess("Client Build complete.");
|
|
return this;
|
|
}
|
|
}
|
|
} |