mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix bug in compiler
This commit is contained in:
parent
030951ccc6
commit
9881ac0b75
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Bilibili Evolved (Offline)
|
// @name Bilibili Evolved (Offline)
|
||||||
// @version 377.11
|
// @version 377.82
|
||||||
// @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中.
|
// @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中.
|
||||||
// @author Grant Howard, Coulomb-G
|
// @author Grant Howard, Coulomb-G
|
||||||
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Bilibili Evolved (Preview Offline)
|
// @name Bilibili Evolved (Preview Offline)
|
||||||
// @version 377.11
|
// @version 377.82
|
||||||
// @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中.
|
// @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中.
|
||||||
// @author Grant Howard, Coulomb-G
|
// @author Grant Howard, Coulomb-G
|
||||||
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||||
|
|||||||
@ -132,7 +132,9 @@ namespace BilibiliEvolved.Build
|
|||||||
{
|
{
|
||||||
public override Predicate<FileInfo> FileFilter { get; } = file =>
|
public override Predicate<FileInfo> FileFilter { get; } = file =>
|
||||||
{
|
{
|
||||||
return file.FullName.Contains(@"src\") && file.Extension == ".js";
|
return file.FullName.Contains("src" + Path.DirectorySeparatorChar) &&
|
||||||
|
!file.FullName.Contains("client" + Path.DirectorySeparatorChar) &&
|
||||||
|
file.Extension == ".js";
|
||||||
};
|
};
|
||||||
|
|
||||||
public override string ResourceType { get; } = "JavaScript";
|
public override string ResourceType { get; } = "JavaScript";
|
||||||
|
|||||||
@ -30,7 +30,7 @@ namespace BilibiliEvolved.Build
|
|||||||
WriteInfo($"TypeScript build: {file}");
|
WriteInfo($"TypeScript build: {file}");
|
||||||
});
|
});
|
||||||
Console.Write(tsc.Run().Trim());
|
Console.Write(tsc.Run().Trim());
|
||||||
Parallel.ForEach(changedFiles.Select(f => "ts-output/" + f.Replace(".ts", ".js")), file => {
|
Parallel.ForEach(changedFiles.Select(f => ".ts-output/" + f.Replace(".ts", ".js").Replace($"src{Path.DirectorySeparatorChar}", "")), file => {
|
||||||
var min = uglifyJs.Minify(File.ReadAllText(file));
|
var min = uglifyJs.Minify(File.ReadAllText(file));
|
||||||
var minFile = ResourceMinifier.GetMinimizedFileName(file);
|
var minFile = ResourceMinifier.GetMinimizedFileName(file);
|
||||||
File.WriteAllText(minFile, min);
|
File.WriteAllText(minFile, min);
|
||||||
|
|||||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user